This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR web/44775: union_match_dups failed to check NULL *ref
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "H.J. Lu" <hongjiu dot lu at intel dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 02 Jul 2010 01:00:30 +0200
- Subject: Re: PATCH: PR web/44775: union_match_dups failed to check NULL *ref
- References: <20100701225418.GA19170@intel.com>
On 07/02/2010 12:54 AM, H.J. Lu wrote:
> 2010-07-01 H.J. Lu <hongjiu.lu@intel.com>
>
> 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));
This looks wrong. If you have a match_dup, you must have a matching
operand. Maybe a pattern isn't being generated correctly?
Bernd