aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2012-09-02 09:07:45 +0200
committerUros Bizjak <uros@gcc.gnu.org>2012-09-02 09:07:45 +0200
commit21975c30c3556005eed8eff93524285ebaf4cdf9 (patch)
treecd59353a1d184020ebcbf0633ee758e001e77533 /gcc
parent603cf12f58f33ebf64e339c6e6a18f6f70d74e9f (diff)
downloadgcc-21975c30c3556005eed8eff93524285ebaf4cdf9.zip
gcc-21975c30c3556005eed8eff93524285ebaf4cdf9.tar.gz
gcc-21975c30c3556005eed8eff93524285ebaf4cdf9.tar.bz2
re PR target/42295 (ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns)
PR target/42295 * g++.dg/opt/pr42295.C: New test. From-SVN: r190854
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.dg/opt/pr42295.C18
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6c43305..5a66dc2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-02 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/42295
+ * g++.dg/opt/pr42295.C: New test.
+
+
2012-09-01 Jakub Jelinek <jakub@redhat.com>
PR target/54436
diff --git a/gcc/testsuite/g++.dg/opt/pr42295.C b/gcc/testsuite/g++.dg/opt/pr42295.C
new file mode 100644
index 0000000..6024206
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr42295.C
@@ -0,0 +1,18 @@
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-options "-O1 -fschedule-insns -fselective-scheduling" }
+
+extern int f (...);
+
+int
+testsum (void *a, int k, int n)
+{
+ int i, j;
+
+ f (n / 2);
+ for (i = 0; i < n; i += 8)
+ for (j = 0; j < n; j += 8)
+ while (k < n)
+ k += 8;
+
+ return k;
+}