This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r187805 - in /trunk/gcc: ChangeLog tree-sra.c
- From: wschmidt at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Wed, 23 May 2012 15:54:00 -0000
- Subject: r187805 - in /trunk/gcc: ChangeLog tree-sra.c
Author: wschmidt
Date: Wed May 23 15:53:59 2012
New Revision: 187805
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187805
Log:
Index: gcc/tree-sra.c
===================================================================
--- gcc/tree-sra.c (revision 187800)
+++ gcc/tree-sra.c (working copy)
@@ -2096,9 +2096,12 @@ analyze_access_subtree (struct access *root, struc
&& (TREE_CODE (root->type) != INTEGER_TYPE
|| TYPE_PRECISION (root->type) != root->size)
/* But leave bitfield accesses alone. */
- && (root->offset % BITS_PER_UNIT) == 0)
+ && (TREE_CODE (root->expr) != COMPONENT_REF
+ || !DECL_BIT_FIELD (TREE_OPERAND (root->expr, 1))))
{
tree rt = root->type;
+ gcc_assert ((root->offset % BITS_PER_UNIT) == 0
+ && (root->size % BITS_PER_UNIT) == 0);
root->type = build_nonstandard_integer_type (root->size,
TYPE_UNSIGNED (rt));
root->expr = build_ref_for_offset (UNKNOWN_LOCATION,
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-sra.c