re PR middle-end/64340 (FAIL: gnat.dg/lto8.adb (internal compiler error))
authorJakub Jelinek <jakub@redhat.com>
Sat, 7 Feb 2015 14:44:26 +0000 (15:44 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 7 Feb 2015 14:44:26 +0000 (15:44 +0100)
PR middle-end/64340
* gcc-interface/trans.c (gigi): Recreate optimization_default_node
and optimization_current_node after tweaking global_options.

From-SVN: r220504

gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c

index e6402b33b9bc3ea1b8a3352eb5788e8941c6b1c2..f34dd913bcca132fd60f4403cc1ece793879ba82 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-07  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/64340
+       * gcc-interface/trans.c (gigi): Recreate optimization_default_node
+       and optimization_current_node after tweaking global_options.
+
 2015-02-05  Robert Dewar  <dewar@adacore.com>
 
        * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
index 9d8541dc9659009b5422cd9caf3c72b9f841c9fd..070acbe0629c958beca02a28e634289521d9ed07 100644 (file)
@@ -678,6 +678,11 @@ gigi (Node_Id gnat_root,
   if (No_Strict_Aliasing_CP)
     flag_strict_aliasing = 0;
 
+  /* Save the current optimization options again after the above possible
+     global_options changes.  */
+  optimization_default_node = build_optimization_node (&global_options);
+  optimization_current_node = optimization_default_node;
+
   /* Now translate the compilation unit proper.  */
   Compilation_Unit_to_gnu (gnat_root);