aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr42630.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2010-01-09 14:41:35 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2010-01-09 14:41:35 +0000
commit60c48e4c8d74d72e45418c5c6348c91f5c6aeafa (patch)
treea7af950455aa369113ee72a90484b8e516e2fb82 /gcc/testsuite/gcc.dg/pr42630.c
parentbb956f3ea05a1c9b59f21aa776da3f582c00d4e0 (diff)
downloadgcc-60c48e4c8d74d72e45418c5c6348c91f5c6aeafa.zip
gcc-60c48e4c8d74d72e45418c5c6348c91f5c6aeafa.tar.gz
gcc-60c48e4c8d74d72e45418c5c6348c91f5c6aeafa.tar.bz2
re PR debug/42630 ("-fcompare-debug failure (length)" with "-O1 -fvariable-expansion-in-unroller -funroll-loops")
gcc/ChangeLog: PR debug/42630 * loop-unroll.c (referenced_in_one_insn_in_loop_p): Count debug uses in new incoming argument. Free body. (reset_debug_uses_in_loop): New. (analyze_insn_to_expand_var): Call the latter if the former found anything. Fix whitespace. Reject invalid dest overlaps before going through all insns in the loop. gcc/testsuite/ChangeLog: PR debug/42630 * gcc.dg/pr42630.c: New. From-SVN: r155764
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr42630.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr42630.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr42630.c b/gcc/testsuite/gcc.dg/pr42630.c
new file mode 100644
index 0000000..34543da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr42630.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fvariable-expansion-in-unroller -funroll-loops -fcompare-debug" } */
+
+int sum(int *buf, int len)
+{
+ int s = 0;
+ while (--len > 0) s += *buf++;
+ return s;
+}