aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57075.c15
-rw-r--r--gcc/tree-inline.c10
4 files changed, 32 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b84161b..38074da 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2013-04-29 Richard Biener <rguenther@suse.de>
+ PR middle-end/57075
+ * tree-inline.c (copy_edges_for_bb): Still split the bbs,
+ even if not adding abnormal edges for calls that can make
+ abnormal gotos.
+
+2013-04-29 Richard Biener <rguenther@suse.de>
+
PR middle-end/57103
* tree-cfg.c (move_stmt_op): Fix condition under which to update
TREE_BLOCK.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 166d4e0..3364efc 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2013-04-29 Richard Biener <rguenther@suse.de>
+ PR middle-end/57075
+ * gcc.dg/torture/pr57075.c: New testcase.
+
+2013-04-29 Richard Biener <rguenther@suse.de>
+
PR middle-end/57103
* gcc.dg/autopar/pr57103.c: New testcase.
diff --git a/gcc/testsuite/gcc.dg/torture/pr57075.c b/gcc/testsuite/gcc.dg/torture/pr57075.c
new file mode 100644
index 0000000..dee74a8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57075.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+extern int baz (void) __attribute__ ((returns_twice));
+int __attribute__ ((__leaf__))
+foo (void)
+{
+ return __builtin_printf ("$");
+}
+
+void
+bar ()
+{
+ foo ();
+ baz ();
+}
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 69455ce..35cdb78 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1923,11 +1923,7 @@ copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb,
into a COMPONENT_REF which doesn't. If the copy
can throw, the original could also throw. */
can_throw = stmt_can_throw_internal (copy_stmt);
- /* If the call we inline cannot make abnormal goto do not add
- additional abnormal edges but only retain those already present
- in the original function body. */
- nonlocal_goto
- = can_make_abnormal_goto && stmt_can_make_abnormal_goto (copy_stmt);
+ nonlocal_goto = stmt_can_make_abnormal_goto (copy_stmt);
if (can_throw || nonlocal_goto)
{
@@ -1955,6 +1951,10 @@ copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb,
else if (can_throw)
make_eh_edges (copy_stmt);
+ /* If the call we inline cannot make abnormal goto do not add
+ additional abnormal edges but only retain those already present
+ in the original function body. */
+ nonlocal_goto &= can_make_abnormal_goto;
if (nonlocal_goto)
make_abnormal_goto_edges (gimple_bb (copy_stmt), true);