aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-11-24 16:23:18 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-11-24 16:23:18 +0100
commit49ec778e046ff6d8e23392355126aed3f2b2a98c (patch)
tree0c42973194f3d91e9f4b76174f145ae1a0f84110 /gcc
parentfea99a375af323e3234a7d2967981067fd450701 (diff)
downloadgcc-49ec778e046ff6d8e23392355126aed3f2b2a98c.zip
gcc-49ec778e046ff6d8e23392355126aed3f2b2a98c.tar.gz
gcc-49ec778e046ff6d8e23392355126aed3f2b2a98c.tar.bz2
re PR rtl-optimization/50290 (ICE: in distribute_notes, at combine.c:13282 with -O2 -fwhole-program -fno-tree-loop-optimize -fno-tree-vrp -funroll-loops)
PR rtl-optimization/50290 * gcc.dg/pr50290.c: New test. From-SVN: r181694
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr50290.c27
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5674c28..bb8baba 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/50290
+ * gcc.dg/pr50290.c: New test.
+
2011-11-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51290
diff --git a/gcc/testsuite/gcc.dg/pr50290.c b/gcc/testsuite/gcc.dg/pr50290.c
new file mode 100644
index 0000000..47680fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr50290.c
@@ -0,0 +1,27 @@
+/* PR rtl-optimization/50290 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-tree-loop-optimize -fno-tree-vrp -funroll-loops" } */
+
+static int
+bar (int t[], int b)
+{
+ int i;
+ for (i = 0; i < b; i++)
+ t[i] = i + (i > 0 ? t[i - 1] : 0);
+ return t[b - 1];
+}
+
+static int
+foo (int b)
+{
+ int x[b];
+ return bar (x, b);
+}
+
+int
+main ()
+{
+ if (foo (6) != 15)
+ __builtin_abort ();
+ return 0;
+}