diff options
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 9d8541dc965..a4ba82e5dfc 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); @@ -1580,8 +1585,9 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute) bool prefix_unused = false; /* ??? If this is an access attribute for a public subprogram to be used in - a dispatch table, do not translate its type as it's useless there and the - parameter types might be incomplete types coming from a limited with. */ + a dispatch table, do not translate its type as it's useless in this case + and the parameter types might be incomplete types coming from a limited + context in Ada 2012 (AI05-0151). */ if (Ekind (Etype (gnat_node)) == E_Access_Subprogram_Type && Is_Dispatch_Table_Entity (Etype (gnat_node)) && Nkind (gnat_prefix) == N_Identifier |