From: Jakub Jelinek Date: Sat, 7 Feb 2015 14:44:26 +0000 (+0100) Subject: re PR middle-end/64340 (FAIL: gnat.dg/lto8.adb (internal compiler error)) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0c91386b7ebd2c241d6ee2d5c172e57f5185472;p=gcc.git re PR middle-end/64340 (FAIL: gnat.dg/lto8.adb (internal compiler error)) PR middle-end/64340 * gcc-interface/trans.c (gigi): Recreate optimization_default_node and optimization_current_node after tweaking global_options. From-SVN: r220504 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e6402b33b9b..f34dd913bcc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2015-02-07 Jakub Jelinek + + 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 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb, diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 9d8541dc965..070acbe0629 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -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);