From c0c91386b7ebd2c241d6ee2d5c172e57f5185472 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 7 Feb 2015 15:44:26 +0100 Subject: [PATCH] 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 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gcc-interface/trans.c | 5 +++++ 2 files changed, 11 insertions(+) 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); -- 2.30.2