aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-06-26 10:25:04 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-06-26 10:25:04 +0000
commitbc583f7a9f8fcb8e22d96a8ec7d8e1727c89ba17 (patch)
tree32e73ee039236f6c97d2d85246e9edc977a53ba2 /gcc/ada
parenta22b794dcaf672c349b95652d975f7cf3c88a9ee (diff)
downloadgcc-bc583f7a9f8fcb8e22d96a8ec7d8e1727c89ba17.zip
gcc-bc583f7a9f8fcb8e22d96a8ec7d8e1727c89ba17.tar.gz
gcc-bc583f7a9f8fcb8e22d96a8ec7d8e1727c89ba17.tar.bz2
trans.c (Handled_Sequence_Of_Statements_to_gnu): When not optimizing the CFG...
* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the at-end procedures. From-SVN: r225004
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/gcc-interface/trans.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 943395e..89d8898 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,11 @@
2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
+ not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
+ at-end procedures.
+
+2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/gigi.h (note_types_used_by_globals): Delete.
(gnat_write_global_declarations): New prototype.
* gcc-interface/utils.c (type_decls): Rename back to...
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index ff910ce..5c9ea08 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -4880,8 +4880,14 @@ Handled_Sequence_Of_Statements_to_gnu (Node_Id gnat_node)
to the binding level we made above. Note that add_cleanup is FIFO
so we must register this cleanup after the EH cleanup just above. */
if (at_end)
- add_cleanup (build_call_n_expr (gnat_to_gnu (At_End_Proc (gnat_node)), 0),
- gnat_cleanup_loc_node);
+ {
+ tree proc_decl = gnat_to_gnu (At_End_Proc (gnat_node));
+ /* When not optimizing, disable inlining of finalizers as this can
+ create a more complex CFG in the parent function. */
+ if (!optimize)
+ DECL_DECLARED_INLINE_P (proc_decl) = 0;
+ add_cleanup (build_call_n_expr (proc_decl, 0), gnat_cleanup_loc_node);
+ }
/* Now build the tree for the declarations and statements inside this block.
If this is SJLJ, set our jmp_buf as the current buffer. */