From patchwork Thu Jul 1 22:54:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: PATCH: PR web/44775: union_match_dups failed to check NULL *ref From: "H.J. Lu" X-Patchwork-Id: 57605 Message-Id: <20100701225418.GA19170@intel.com> To: gcc-patches@gcc.gnu.org Date: Thu, 1 Jul 2010 15:54:18 -0700 Hi, This patch adds check for NULL *ref. OK to install? Thanks. H.J. --- 2010-07-01 H.J. Lu PR web/44775 * web.c (union_match_dups): Check NULL *ref. diff --git a/gcc/web.c b/gcc/web.c index ff91733..4b2ce36 100644 --- a/gcc/web.c +++ b/gcc/web.c @@ -123,7 +123,8 @@ union_match_dups (rtx insn, struct web_entry *def_entry, if (DF_REF_LOC (*ref) == recog_data.operand_loc[op]) break; - (*fun) (use_entry + DF_REF_ID (*dupref), entry + DF_REF_ID (*ref)); + if (*ref) + (*fun) (use_entry + DF_REF_ID (*dupref), entry + DF_REF_ID (*ref)); } }