aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-08-20 11:12:05 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2012-08-20 11:12:05 +0200
commit081db96050b57d83e0f82bd74c3a22cf7b93c2ed (patch)
treeca1b85138593c09499fa1fc840dae8fc9e21b127 /gcc/testsuite
parentd17fd79ca1fcad80aa66203b081aea61b758b814 (diff)
downloadgcc-081db96050b57d83e0f82bd74c3a22cf7b93c2ed.zip
gcc-081db96050b57d83e0f82bd74c3a22cf7b93c2ed.tar.gz
gcc-081db96050b57d83e0f82bd74c3a22cf7b93c2ed.tar.bz2
re PR middle-end/54321 (ice in tree_low_cst at -O3)
PR tree-optimization/54321 * tree-ssa-forwprop.c (simplify_builtin_call): Pass 0 instead of 1 as second argument to tree_low_cst call on val2. * gcc.c-torture/compile/pr54321.c: New test. From-SVN: r190526
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr54321.c12
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c115e55..3ef6c94 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/54321
+ * gcc.c-torture/compile/pr54321.c: New test.
+
2012-08-20 Tobias Burnus <burnus@net-b.de>
PR fortran/54301
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54321.c b/gcc/testsuite/gcc.c-torture/compile/pr54321.c
new file mode 100644
index 0000000..13adc78
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr54321.c
@@ -0,0 +1,12 @@
+/* PR tree-optimization/54321 */
+struct S { char s[0]; } *a;
+
+void
+foo (void)
+{
+ char *b = a->s;
+ int c = 0;
+ b[0] = 0;
+ while (++c < 9)
+ b[c] = 255;
+}