diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-17 19:09:56 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-17 19:09:56 +0000 |
commit | 639d27bb3af72c526fa09f4d07afedfe58997e1c (patch) | |
tree | 794c7a811a82b0f133d7d2035b17e998db572bc4 /gcc/web.c | |
parent | 3538df8bdb79ea8749218733b71a0585213ae1c1 (diff) | |
download | gcc-639d27bb3af72c526fa09f4d07afedfe58997e1c.tar.gz |
* web.c (union_match_dups): Ensure that DF_REF_LOC exists before
accessing DF_REF_REAL_LOC.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199029 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/web.c')
-rw-r--r-- | gcc/web.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/web.c b/gcc/web.c index 7f667db2cc5..df4c84fd774 100644 --- a/gcc/web.c +++ b/gcc/web.c @@ -133,9 +133,10 @@ union_match_dups (rtx insn, struct web_entry *def_entry, entry = type == OP_IN ? use_entry : def_entry; for (; *ref; ref++) { - if (DF_REF_LOC (*ref) == recog_data.operand_loc[op]) + rtx *l = DF_REF_LOC (*ref); + if (l == recog_data.operand_loc[op]) break; - if (DF_REF_REAL_LOC (*ref) == recog_data.operand_loc[op]) + if (l && DF_REF_REAL_LOC (*ref) == recog_data.operand_loc[op]) break; } @@ -143,9 +144,10 @@ union_match_dups (rtx insn, struct web_entry *def_entry, { for (ref = use_link, entry = use_entry; *ref; ref++) { - if (DF_REF_LOC (*ref) == recog_data.operand_loc[op]) + rtx *l = DF_REF_LOC (*ref); + if (l == recog_data.operand_loc[op]) break; - if (DF_REF_REAL_LOC (*ref) == recog_data.operand_loc[op]) + if (l && DF_REF_REAL_LOC (*ref) == recog_data.operand_loc[op]) break; } } |