aboutsummaryrefslogtreecommitdiff
path: root/gcc/web.c
diff options
context:
space:
mode:
authorJie Zhang <jie@codesourcery.com>2011-02-05 12:06:18 +0000
committerJie Zhang <jiez@gcc.gnu.org>2011-02-05 12:06:18 +0000
commitbeea27550eb8be53affa33bdd8a32714b7166c60 (patch)
treea89f09befdf6264a67eab321cdb66ca533fd5129 /gcc/web.c
parent991fcb7a01b62d7e35ec2175aa0438585c74acab (diff)
downloadgcc-beea27550eb8be53affa33bdd8a32714b7166c60.zip
gcc-beea27550eb8be53affa33bdd8a32714b7166c60.tar.gz
gcc-beea27550eb8be53affa33bdd8a32714b7166c60.tar.bz2
re PR rtl-optimization/42631 ("-fcompare-debug failure" with "-O1 -funroll-loops")
PR debug/42631 * web.c (entry_register): Don't clobber the number of the first uninitialized reference in used[]. testsuite/ PR debug/42631 * gcc.dg/pr42631.c: Update test. * gcc.dg/pr42631-2.c: New test. From-SVN: r169851
Diffstat (limited to 'gcc/web.c')
-rw-r--r--gcc/web.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/web.c b/gcc/web.c
index 9b84924..7014aa5 100644
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -260,7 +260,11 @@ entry_register (struct web_entry *entry, df_ref ref, unsigned int *used)
and there won't be any use for the other values when we get to
this point. */
if (used[REGNO (reg)] != 1)
- newreg = reg, used[REGNO (reg)] = 1;
+ {
+ newreg = reg;
+ if (!used[REGNO (reg)])
+ used[REGNO (reg)] = 1;
+ }
else
{
newreg = gen_reg_rtx (GET_MODE (reg));