aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Sandiford <r.sandiford@uk.ibm.com>2014-05-26 18:50:55 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-05-26 18:50:55 +0000
commit3e26c8f6099f045cc5804968bbe7ad56ef28ab5c (patch)
tree21a0a8b4063a6435c89c6ef18670302306d554e3 /gcc/testsuite
parentcf0ff174cd17856e67b222efaaf4344adc3e4410 (diff)
downloadgcc-3e26c8f6099f045cc5804968bbe7ad56ef28ab5c.zip
gcc-3e26c8f6099f045cc5804968bbe7ad56ef28ab5c.tar.gz
gcc-3e26c8f6099f045cc5804968bbe7ad56ef28ab5c.tar.bz2
re PR rtl-optimization/61222 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in decompose, at rtl.h:1456)
gcc/ PR rtl-optimization/61222 * combine.c (simplify_shift_const_1): When moving a PLUS outside the shift, truncate the PLUS operand to the result mode. gcc/testsuite/ PR rtl-optimization/61222 * gcc.c-torture/compile/pr61222-1.c: New test. * gcc.c-torture/compile/pr61222-2.c: Likewise. From-SVN: r210945
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr61222-1.c23
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr61222-2.c7
3 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f3305a3..a9eab00 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-26 Richard Sandiford <r.sandiford@uk.ibm.com>
+
+ PR rtl-optimization/61222
+ * gcc.c-torture/compile/pr61222-1.c: New test.
+ * gcc.c-torture/compile/pr61222-2.c: Likewise.
+
2014-05-26 Uros Bizjak <ubizjak@gmail.com>
* c-c++-common/cilk-plus/AN/pr61191.c: Fix dg-error directives.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr61222-1.c b/gcc/testsuite/gcc.c-torture/compile/pr61222-1.c
new file mode 100644
index 0000000..8890193
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr61222-1.c
@@ -0,0 +1,23 @@
+int a, b, d, e;
+char c;
+
+void
+foo ()
+{
+ for (; a; a++)
+ {
+ d = ((b == 0) ^ (129 + a));
+ c = d * 9;
+ e = c < 1;
+ if (e)
+ for (;;)
+ ;
+ }
+}
+
+int
+main ()
+{
+ foo ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr61222-2.c b/gcc/testsuite/gcc.c-torture/compile/pr61222-2.c
new file mode 100644
index 0000000..23611c1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr61222-2.c
@@ -0,0 +1,7 @@
+int a, b, d;
+int main (void)
+{
+ int c = a && 1;
+ d = 1 << (((c | (b - 842)) << 1) + 1);
+ return 0;
+}