summaryrefslogtreecommitdiff
path: root/gcc/web.c
diff options
context:
space:
mode:
authorjiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-05 12:06:18 +0000
committerjiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-05 12:06:18 +0000
commit51a13f08e2afea8c46cc1977b86dd0964da07bd5 (patch)
treea89f09befdf6264a67eab321cdb66ca533fd5129 /gcc/web.c
parent5469d624c4f8debf139d17cc148cf938168bf81e (diff)
downloadgcc-51a13f08e2afea8c46cc1977b86dd0964da07bd5.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169851 138bc75d-0d04-0410-961f-82ee72b054a4
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 9b849249b0d..7014aa55dc7 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));