This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR web/44775: union_match_dups failed to check NULL *ref


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]