Patchwork web ICEs on subreg

login
register
mail settings
Submitter Mike Stump
Date May 17, 2013, 7:28 p.m.
Message ID <73FC2263-1672-47EE-A8B4-D57399F64DB2@comcast.net>
Download mbox | patch
Permalink /patch/244693/
State New
Headers show

Comments

Mike Stump - May 17, 2013, 7:28 p.m.
On May 16, 2013, at 5:26 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
> This patch is creating new segfaults for 32 bit POWER AIX.

Thanks for the heads up.  Fixed in r199030.
2013-05-17  Mike Stump  <mikestump@comcast.net>

	PR rtl-optimization/57304
	* web.c (union_match_dups): Ensure that DF_REF_LOC exists before
	accessing DF_REF_REAL_LOC.

------------------------------

Patch

Index: web.c
===================================================================
--- web.c	(revision 199016)
+++ web.c	(working copy)
@@ -133,9 +133,10 @@  union_match_dups (rtx insn, struct web_e
       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_e
 	{
 	  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;
 	    }
 	}