From: Mike Stump Date: Fri, 17 May 2013 19:09:56 +0000 (+0000) Subject: web.c (union_match_dups): Ensure that DF_REF_LOC exists before accessing DF_REF_REAL_LOC. X-Git-Tag: releases/gcc-4.9.0~5832 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6545f29e71a80488cb23fbc9a3102d974c03a7f;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c406123b5fc..0a7ae768c610 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-05-17 Mike Stump + + * web.c (union_match_dups): Ensure that DF_REF_LOC exists before + accessing DF_REF_REAL_LOC. + 2013-05-17 Jakub Jelinek PR rtl-optimization/57281 diff --git a/gcc/web.c b/gcc/web.c index 7f667db2cc53..df4c84fd7741 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; } }