This is the mail archive of the gcc-bugs@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]

[Bug optimization/13424] [3.4/3.5 Regression] gcc.dg/20031202-1.c is miscompiled


------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  2004-03-03 00:58 -------
Subject: Re:  [3.4/3.5 Regression] gcc.dg/20031202-1.c

> ------- Additional Comments From rth at gcc dot gnu dot org  2004-03-02
> 23:43 -------
> I am distinctly tired of this RTX_UNCHANGING_P mess.  It's demonstrably so
> badly designed that no-one has a good handle on how to fix it properly.
> 
> I propose that it simply be disabled on 3.4/3.5, and hope to fix the problem
> differently with tree-ssa.

The patch that Jakub proposed for 3.3 (?) fixed the test failure on the
PA but as noted in the discussion at the time it wasn't a proper fix.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.610
diff -u -3 -p -r1.610 expr.c
--- expr.c	1 Jan 2004 14:13:41 -0000	1.610
+++ expr.c	2 Jan 2004 03:32:49 -0000
@@ -4565,15 +4565,7 @@ store_constructor (tree exp, rtx target,
 		   || ((HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (target))
 		       == size)))
 	{
-	  rtx xtarget = target;
-
-	  if (readonly_fields_p (type))
-	    {
-	      xtarget = copy_rtx (xtarget);
-	      RTX_UNCHANGING_P (xtarget) = 1;
-	    }
-
-	  clear_storage (xtarget, GEN_INT (size));
+	  clear_storage (target, GEN_INT (size));
 	  cleared = 1;
 	}
 
@@ -4994,9 +4986,9 @@ store_constructor (tree exp, rtx target,
 		  target = copy_rtx (target);
 		  MEM_KEEP_ALIAS_SET_P (target) = 1;
 		}
-	      else
-		store_constructor_field (target, bitsize, bitpos, mode, value,
-					 type, cleared, get_alias_set (elttype));
+
+	     store_constructor_field (target, bitsize, bitpos, mode, value,
+				      type, cleared, get_alias_set (elttype));
 	    }
 	}
       if (vector)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13424


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