]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/55008 (Internal compiler error : verify_ssa failed)
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Mon, 22 Oct 2012 22:09:22 +0000 (22:09 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Mon, 22 Oct 2012 22:09:22 +0000 (22:09 +0000)
gcc:

2012-10-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/55008
* gimple-ssa-strength-reduction.c (find_basis_for_candidate): Don't
allow a candidate to be a basis for itself under another interpretation.

gcc/testsuite:

2012-10-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/55008
* gcc.dg/tree-ssa/pr55008.c: New test.

From-SVN: r192696

gcc/ChangeLog
gcc/gimple-ssa-strength-reduction.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr55008.c [new file with mode: 0644]

index 3794f50c64b509d9175d9a3976aaa34364f9a14e..e25a8ae904870e15c5fdad6a40813e19dc0304b2 100644 (file)
@@ -1,3 +1,9 @@
+2012-10-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       PR tree-optimization/55008
+       * gimple-ssa-strength-reduction.c (find_basis_for_candidate): Don't
+       allow a candidate to be a basis for itself under another interpretation.
+
 2012-10-22  Sharad Singhai  <singhai@google.com>
 
        * dumpfile.c (dump_phase_enabled_p): Renamed dump_enabled_p. Update
index 46600a57f8132a38bf2d4f6f4fafcbe31676dfcb..0523854027fb1b78720441350626b03c2e7c59cc 100644 (file)
@@ -366,6 +366,7 @@ find_basis_for_candidate (slsr_cand_t c)
       slsr_cand_t one_basis = chain->cand;
 
       if (one_basis->kind != c->kind
+         || one_basis->cand_stmt == c->cand_stmt
          || !operand_equal_p (one_basis->stride, c->stride, 0)
          || !types_compatible_p (one_basis->cand_type, c->cand_type)
          || !dominated_by_p (CDI_DOMINATORS,
index c994df96272bcbae4b1253f3de8da1bbc58b2f80..243d74e352d61af2c0d0e2562a3f62bf7354a1fc 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       PR tree-optimization/55008
+       * gcc.dg/tree-ssa/pr55008.c: New test.
+
 2012-10-22  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/55011
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr55008.c b/gcc/testsuite/gcc.dg/tree-ssa/pr55008.c
new file mode 100644 (file)
index 0000000..32af32a
--- /dev/null
@@ -0,0 +1,17 @@
+/* This used to fail to compile; see PR55008.  */
+/* { dg-do compile } */
+/* { dg-options "-O2 -w" } */
+
+typedef unsigned long long T;
+
+void f(void)
+{
+    int a, *p;
+
+    T b = 6309343725;
+
+    if(*p ? (b = 1) : 0)
+        if(b - (a = b /= 0) ? : (a + b))
+            while(1);
+}
+