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]

[PATCH] Re: target/7434: [x86_64] ICE in change_address_1, at emit-rtl.c:1934


On Thu, May 15, 2003 at 04:34:02AM -0000, bangerth@dealii.org wrote:
> Synopsis: [x86_64] ICE in change_address_1, at emit-rtl.c:1934
> 
> Responsible-Changed-From-To: unassigned->jakub
> Responsible-Changed-By: bangerth
> Responsible-Changed-When: Thu May 15 04:34:02 2003
> Responsible-Changed-Why:
>     Jakub, you applied the patch for this PR. Can it be closed?
> State-Changed-From-To: open->feedback
> State-Changed-By: bangerth
> State-Changed-When: Thu May 15 04:34:02 2003
> State-Changed-Why:
>     .
> 
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7434

It seems the following patch has not made it to gcc-patches ever (was
apparently just sent to gcc-gnats@gcc.gnu.org), though the bug is still present even
on the trunk.
Ok to commit it to trunk/3.3 (is already on gcc-3_2-rhl8-branch for half a
year)?

Sat Aug 10 22:14:41 CEST 2002  Jan Hubicka  <jh@suse.cz>

	PR target/7434
	* i386.c (ix86_split_long_move): Fix modes in the precomputed address
	references.

2002-10-08  Jakub Jelinek  <jakub@redhat.com>

	PR target/7434
	* gcc.c-torture/compile/20021008-1.c: New test.

--- gcc/config/i386/i386.c	5 Oct 2002 19:11:25 -0000	1.368.2.19.2.2.2.2
+++ gcc/config/i386/i386.c	8 Oct 2002 19:08:21 -0000	1.368.2.19.2.2.2.3
@@ -9448,15 +9448,16 @@ ix86_split_long_move (operands)
 	 Do an lea to the last part and use only one colliding move.  */
       else if (collisions > 1)
 	{
+	  rtx addrreg = gen_lowpart (Pmode, part[0][nparts - 1]);
 	  collisions = 1;
-	  emit_insn (gen_rtx_SET (VOIDmode, part[0][nparts - 1],
+	  emit_insn (gen_rtx_SET (VOIDmode, addrreg,
 				  XEXP (part[1][0], 0)));
-	  part[1][0] = change_address (part[1][0],
-				       TARGET_64BIT ? DImode : SImode,
-				       part[0][nparts - 1]);
-	  part[1][1] = adjust_address (part[1][0], VOIDmode, UNITS_PER_WORD);
+	  part[1][0] = change_address (part[1][0], GET_MODE (part[0][0]),
+				       addrreg);
+	  part[1][1] = adjust_address (part[1][0], GET_MODE (part[0][1]),
+				       UNITS_PER_WORD);
 	  if (nparts == 3)
-	    part[1][2] = adjust_address (part[1][0], VOIDmode, 8);
+	    part[1][2] = adjust_address (part[1][0], GET_MODE (part[0][2]), 8);
 	}
     }
 
--- gcc/testsuite/gcc.c-torture/compile/20021008-1.c	2003-01-30 05:24:37.000000000 -0500
+++ gcc/testsuite/gcc.c-torture/compile/20021008-1.c	2002-10-08 15:11:59.000000000 -0400
@@ -0,0 +1,11 @@
+/* Origin: PR target/7434 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> */
+
+int main(void)
+{
+  static const int align_g[] = { 1, 2, 4, 8, 16 };
+  char * buf;
+  int i = 0;
+  volatile long double val = 0;
+  val = *((long double *)(buf + align_g[i]));
+  return 0;
+}


	Jakub


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