]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
web.c (union_match_dups): Ensure that DF_REF_LOC exists before accessing DF_REF_REAL_LOC.
authorMike Stump <mikestump@comcast.net>
Fri, 17 May 2013 19:09:56 +0000 (19:09 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Fri, 17 May 2013 19:09:56 +0000 (19:09 +0000)
* web.c (union_match_dups): Ensure that DF_REF_LOC exists before
accessing DF_REF_REAL_LOC.

From-SVN: r199029

gcc/ChangeLog
gcc/web.c

index 4c406123b5fcfe44b6a0503eb327352f494d723f..0a7ae768c6104aa57c1f41fdc0a9417d6a9289b9 100644 (file)
@@ -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
index 7f667db2cc535b87c496e46a47bb1b657ea9aa9a..df4c84fd7741c23fbab51c1f44e9a21542c2b873 100644 (file)
--- 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;
            }
        }