Patchwork Fix PR45379

login
register
mail settings
Submitter Richard Guenther
Date Aug. 25, 2010, 10:02 a.m.
Message ID <alpine.LNX.2.00.1008251201190.28912@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/62662/
State New
Headers show

Comments

Richard Guenther - Aug. 25, 2010, 10:02 a.m.
This fixes PR45379 - I missed to set alignment from TARGET_MEM_REF
in set_mem_attributes_minus_bitpos.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2010-08-25  Richard Guenther  <rguenther@suse.de>

	PR middle-end/45379
	* emit-rtl.c (set_mem_attributes_minus_bitpos): Handle
	TARGET_MEM_REF in alignment computation.

Patch

Index: gcc/emit-rtl.c
===================================================================
--- gcc/emit-rtl.c	(revision 163519)
+++ gcc/emit-rtl.c	(working copy)
@@ -1615,6 +1615,11 @@  set_mem_attributes_minus_bitpos (rtx ref
 	align = MAX (align, TYPE_ALIGN (type));
     }
 
+  else if (TREE_CODE (t) == TARGET_MEM_REF)
+    /* ??? This isn't fully correct, we can't set the alignment from the
+       type in all cases.  */
+    align = MAX (align, TYPE_ALIGN (type));
+
   else if (TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
     {
       if (integer_zerop (TREE_OPERAND (t, 1)))