diff options
author | Mike Stump <mikestump@comcast.net> | 2013-05-17 19:09:56 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2013-05-17 19:09:56 +0000 |
commit | d6545f29e71a80488cb23fbc9a3102d974c03a7f (patch) | |
tree | 794c7a811a82b0f133d7d2035b17e998db572bc4 | |
parent | 6db9ce91e40f9f201615cd62984e7218faca0318 (diff) | |
download | gcc-d6545f29e71a80488cb23fbc9a3102d974c03a7f.zip gcc-d6545f29e71a80488cb23fbc9a3102d974c03a7f.tar.gz gcc-d6545f29e71a80488cb23fbc9a3102d974c03a7f.tar.bz2 |
web.c (union_match_dups): Ensure that DF_REF_LOC exists before accessing DF_REF_REAL_LOC.
* web.c (union_match_dups): Ensure that DF_REF_LOC exists before
accessing DF_REF_REAL_LOC.
From-SVN: r199029
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/web.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c40612..0a7ae76 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-05-17 Mike Stump <mikestump@comcast.net> + + * web.c (union_match_dups): Ensure that DF_REF_LOC exists before + accessing DF_REF_REAL_LOC. + 2013-05-17 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/57281 @@ -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; } } |