This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Update optimization_default_node in ada (PR middle-end/64340)

On February 6, 2015 9:26:29 PM CET, Jakub Jelinek <> wrote:
>As mentioned in the PR, the problem here is that the Ada FE needs to
>global_options after toplevel.c (process_options), but as for LTO we
>now use
>optimization_{default,current}_node for options of functions without
>specifial optimization node, it means the changed options aren't
>in there.
>Fixed thusly, bootstrapped/regtested on x86_64-linux, ok for trunk?

Can't ada use one of the option processing langhooks or represent this change similar to optimization pragmas in other frontends?


>2015-02-06  Jakub Jelinek  <>
>	PR middle-end/64340
>	* gcc-interface/trans.c (gigi): Recreate optimization_default_node
>	and optimization_current_node after tweaking global_options.
>--- gcc/ada/gcc-interface/trans.c.jj	2015-01-12 18:56:10.000000000
>+++ gcc/ada/gcc-interface/trans.c	2015-02-06 16:39:04.353363393 +0100
>@@ -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
>+     global_options changes.  */
>+  optimization_default_node = build_optimization_node
>+  optimization_current_node = optimization_default_node;
>   /* Now translate the compilation unit proper.  */
>   Compilation_Unit_to_gnu (gnat_root);
>	Jakub

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]