re PR rtl-optimization/14984 (bootstrap binary compare differs for Ada object files...
authorLaurent GUERBY <laurent@guerby.net>
Fri, 23 Apr 2004 06:28:52 +0000 (06:28 +0000)
committerLaurent Guerby <guerby@gcc.gnu.org>
Fri, 23 Apr 2004 06:28:52 +0000 (06:28 +0000)
2004-04-22  Laurent GUERBY <laurent@guerby.net>

PR optimization/14984
PR optimization/14985
* trans.c (gigi): Fix non determinism leading to bootstrap
comparison failures.

From-SVN: r81076

gcc/ada/ChangeLog
gcc/ada/trans.c

index 55b06a02c7fc1f262f85ff6c823301f7dda154d2..697cdb379de7fc4a0a02f195b3826c69a814b2ae 100644 (file)
@@ -1,3 +1,10 @@
+2004-04-22  Laurent GUERBY <laurent@guerby.net>
+
+       PR optimization/14984
+       PR optimization/14985
+       * trans.c (gigi): Fix non determinism leading to bootstrap
+       comparison failures.
+
 2004-04-21  Pascal Obry  <obry@gnat.com>
 
        * adaint.c (__gnat_portable_spawn): Quote first argument (argv[0])
index 9c5b3f5f88313b063d41bb5dc3ed31296c5e3ced..8b4854559498110571ec3514f031ba53f89c95e2 100644 (file)
@@ -2112,8 +2112,11 @@ tree_transform (Node_Id gnat_node)
        for (gnat_temp = First (Elsif_Parts (gnat_node));
             Present (gnat_temp); gnat_temp = Next (gnat_temp))
          {
-           tree gnu_elseif
-             = build_nt (IF_STMT, gnat_to_gnu (Condition (gnat_temp)),
+            tree gnu_cond, gnu_elseif;
+
+            gnu_cond = gnat_to_gnu (Condition (gnat_temp));
+           gnu_elseif
+             = build_nt (IF_STMT, gnu_cond,
                          build_block_stmt (Then_Statements (gnat_temp)),
                          NULL_TREE, NULL_TREE);
 
@@ -2123,10 +2126,18 @@ tree_transform (Node_Id gnat_node)
            gnu_result = gnu_elseif;
          }
 
-      gnu_result = build_nt (IF_STMT, gnat_to_gnu (Condition (gnat_node)),
-                            build_block_stmt (Then_Statements (gnat_node)),
-                            nreverse (gnu_result),
-                            build_block_stmt (Else_Statements (gnat_node)));
+      {
+        tree gnu_cond, then_block, else_block;
+
+        gnu_cond = gnat_to_gnu (Condition (gnat_node));
+        then_block = build_block_stmt (Then_Statements (gnat_node));
+        else_block = build_block_stmt (Else_Statements (gnat_node));
+
+        gnu_result = build_nt (IF_STMT, gnu_cond, 
+                              then_block,
+                              nreverse (gnu_result),
+                              else_block);
+      }
       break;
 
     case N_Case_Statement: