2
0
Эх сурвалжийг харах

* missing skiplabel added, resolves #33423

git-svn-id: trunk@38520 -
florian 7 жил өмнө
parent
commit
b9417cc51e

+ 1 - 0
compiler/avr/navrmat.pas

@@ -77,6 +77,7 @@ implementation
                 skiplabel.increfs;
                 skiplabel.increfs;
                 location_reset_jump(location,truelabel,falselabel);
                 location_reset_jump(location,truelabel,falselabel);
                 cg.a_jmp_always(current_asmdata.CurrAsmList,falselabel);
                 cg.a_jmp_always(current_asmdata.CurrAsmList,falselabel);
+                cg.a_label(current_asmdata.CurrAsmList,skiplabel);
                 cg.a_jmp_always(current_asmdata.CurrAsmList,truelabel);
                 cg.a_jmp_always(current_asmdata.CurrAsmList,truelabel);
               end
               end
             else if (left.location.loc in [LOC_SUBSETREF,LOC_CSUBSETREF]) and
             else if (left.location.loc in [LOC_SUBSETREF,LOC_CSUBSETREF]) and

+ 16 - 7
tests/webtbs/tw33417.pp

@@ -5,27 +5,36 @@ type
 
 
 var
 var
   gflags : tflags;
   gflags : tflags;
+  i : byte;
 
 
-procedure p;
+procedure p(pflags : tflags);
 
 
 var
 var
   flags : tflags;
   flags : tflags;
 begin
 begin
   flags:=gflags;
   flags:=gflags;
   if flags.bit5 then
   if flags.bit5 then
-    halt(1);
+    i:=1;
+  if pflags.bit5 then
+    i:=1;
   if gflags.bit5 then
   if gflags.bit5 then
-    halt(1);
+    i:=1;
   if not flags.bit6 then
   if not flags.bit6 then
-    halt(1);
+    i:=1;
+  if not pflags.bit6 then
+    i:=1;
   if not gflags.bit6 then
   if not gflags.bit6 then
-    halt(1);
+    i:=1;
 end;
 end;
 
 
 begin
 begin
   gflags.bit4:=false;
   gflags.bit4:=false;
   gflags.bit5:=false;
   gflags.bit5:=false;
   gflags.bit6:=true;
   gflags.bit6:=true;
-  p;
-  writeln('ok');
+  i:=0;
+  p(gflags);
+  if i<>0 then
+    halt(i)
+  else
+    writeln('ok');
 end.
 end.