Browse Source

* fixed forcing setelementn on the correct side in add nodes
(pass_left_right() can switch the sides, so putting it in the
correct location before calling that method is useless)

git-svn-id: trunk@18254 -

Jonas Maebe 14 years ago
parent
commit
6748a9a238
1 changed files with 4 additions and 4 deletions
  1. 4 4
      compiler/ncgadd.pas

+ 4 - 4
compiler/ncgadd.pas

@@ -342,14 +342,14 @@ interface
       begin
         if nodetype<>addn then
           internalerror(20080302);
-        { setelementn is a special case, it must be on right }
-        if (nf_swapped in flags) and
-           (left.nodetype=setelementn) then
-          swapleftright;
         { no range support for smallsets }
         if assigned(tsetelementnode(right).right) then
           internalerror(20080303);
         pass_left_right;
+        { setelementn is a special case, it must be on right }
+        if (nf_swapped in flags) and
+           (left.nodetype=setelementn) then
+          swapleftright;
         force_reg_left_right(false,false);
         set_result_location_reg;
         setbase:=tsetdef(left.resultdef).setbase;