aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-03-07 17:01:54 +0000
committerJeff Law <law@gcc.gnu.org>2016-03-07 10:01:54 -0700
commita84a49b7e7ac9b6f576508aa0683a4f14cb44f7d (patch)
tree705e817ab10e9dde6d04bbbf7f189860002d06c1 /gcc/testsuite
parent55a82b661e036bab010d916f5bb60c0b6d279f3c (diff)
downloadgcc-a84a49b7e7ac9b6f576508aa0683a4f14cb44f7d.zip
gcc-a84a49b7e7ac9b6f576508aa0683a4f14cb44f7d.tar.gz
gcc-a84a49b7e7ac9b6f576508aa0683a4f14cb44f7d.tar.bz2
re PR tree-optimization/69740 (gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "verify_loop_structure")
PR tree-optimization/69740 * cfghooks.c (remove_edge): Request loop fixups if we delete an edge that might turn an irreducible loop into a natural loop. * cfgloop.h (check_verify_loop_structure): Clear LOOPS_NEED_FIXUP. Move after definition of loops_state_clear. PR tree-optimization/69740 * gcc.c-torture/compile/pr69740-1.c: New test. * gcc.c-torture/compile/pr69740-2.c: New test. Co-Authored-By: Jeff Law <law@redhat.com> From-SVN: r234036
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr69740-1.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr69740-2.c19
3 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4447ba6..bf8e231 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2016-02-26 Richard Biener <rguenther@suse.de>
+ Jeff Law <law@redhat.com>
+
+ PR tree-optimization/69740
+ * gcc.c-torture/compile/pr69740-1.c: New test.
+ * gcc.c-torture/compile/pr69740-2.c: New test.
+
2016-03-07 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* lib/target-supports.exp
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr69740-1.c b/gcc/testsuite/gcc.c-torture/compile/pr69740-1.c
new file mode 100644
index 0000000..ac867d8
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr69740-1.c
@@ -0,0 +1,12 @@
+char a;
+short b;
+void fn1() {
+ if (b)
+ ;
+ else {
+ int c[1] = {0};
+ l1:;
+ }
+ if (a)
+ goto l1;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr69740-2.c b/gcc/testsuite/gcc.c-torture/compile/pr69740-2.c
new file mode 100644
index 0000000..a89c9a0
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr69740-2.c
@@ -0,0 +1,19 @@
+inline int foo(int *p1, int p2) {
+ int z = *p1;
+ while (z > p2)
+ p2 = 2;
+ return z;
+}
+int main() {
+ int i;
+ for (;;) {
+ int j, k;
+ i = foo(&k, 7);
+ if (k)
+ j = i;
+ else
+ k = j;
+ if (2 != j)
+ __builtin_abort();
+ }
+}