aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr44539.c29
-rw-r--r--gcc/tree-cfgcleanup.c3
4 files changed, 43 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d56312a..64c82e2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/44539
+ * tree-cfgcleanup.c (fixup_noreturn_call): Call update_stmt even when
+ the call doesn't have LHS, but has VDEF.
+
2010-06-25 Joseph Myers <joseph@codesourcery.com>
* config/pa/pa.h (MODIFY_TARGET_NAME): Remove.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9a397e2..55b8019 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/44539
+ * gcc.dg/pr44539.c: New test.
+
2010-06-25 Bernd Schmidt <bernds@codesourcery.com>
From Jim Wilson:
diff --git a/gcc/testsuite/gcc.dg/pr44539.c b/gcc/testsuite/gcc.dg/pr44539.c
new file mode 100644
index 0000000..9cfff7a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44539.c
@@ -0,0 +1,29 @@
+/* PR tree-optimization/44539 */
+/* { dg-do compile } */
+/* { dg-options "-ftracer -freorder-blocks -O2" } */
+
+void bar (int file);
+extern int baz (void);
+
+void noret1 ()
+{
+ bar (0);
+ __builtin_exit (0);
+}
+
+void noret2 ()
+{
+ __builtin_exit (0);
+}
+
+void bar (int i)
+{
+ if (baz ())
+ noret1 (i);
+}
+
+void foo (int i)
+{
+ if (~i) bar (i);
+ i ? noret1 () : noret2 ();
+}
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 7e78174..7f8498a 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -591,6 +591,9 @@ fixup_noreturn_call (gimple stmt)
update_stmt (stmt);
changed = true;
}
+ /* Similarly remove VDEF if there is any. */
+ else if (gimple_vdef (stmt))
+ update_stmt (stmt);
return changed;
}