summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-26 10:12:35 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-26 10:12:35 +0000
commit21951fbd4a7b88ef7ba76537f81a97c5b7e3358a (patch)
tree44fbb99e75e09d9b2374c79fd95d10119f0db2d6 /gcc/testsuite
parent32eca732897e9d19bf26f1283582ee3ff120ffed (diff)
downloadgcc-21951fbd4a7b88ef7ba76537f81a97c5b7e3358a.tar.gz
2012-10-26 Richard Biener <rguenther@suse.de>
PR middle-end/54824 * tree-optimize.c (execute_fixup_cfg): Insert __builtin_unreachable at the end of blocks with no successors. * gcc.dg/torture/pr54824.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192841 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54824.c16
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 918af7526fe..c3badec964f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-26 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/54824
+ * gcc.dg/torture/pr54824.c: New testcase.
+
2012-10-26 Alexander Ivchenko <alexander.ivchenko@intel.com>
* gcc.target/i386/fxsave-1.c: New.
diff --git a/gcc/testsuite/gcc.dg/torture/pr54824.c b/gcc/testsuite/gcc.dg/torture/pr54824.c
new file mode 100644
index 00000000000..82b822b0993
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54824.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+void __attribute__((noreturn)) bar(void)
+{
+}
+
+void foo(int i, char *p, char *q)
+{
+ while (*p++) {
+ if (i)
+ p++;
+ if (!*q++)
+ bar();
+ }
+}