This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Problem with component extractions
- To: gcc-patches at gcc dot gnu dot org
- Subject: Problem with component extractions
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Fri, 3 Mar 00 15:52:24 EST
I commited this fix to an obscure problem involving extractions of
components of records that are themselves records in big endian machines.
Fri Mar 3 14:56:12 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (expand_expr, case COMPONENT_REF): Use bitfield case if
result is a RECORD_TYPE.
*** expr.c.mar3 Tue Feb 1 17:09:54 2000
--- expr.c Fri Mar 3 12:53:13 2000
*************** expand_expr (exp, target, tmode, modifie
*** 6000,6004 ****
|| (mode1 != BLKmode && SLOW_UNALIGNED_ACCESS
&& ((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode))
! || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))))
|| (modifier != EXPAND_CONST_ADDRESS
&& modifier != EXPAND_INITIALIZER
--- 6000,6014 ----
|| (mode1 != BLKmode && SLOW_UNALIGNED_ACCESS
&& ((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode))
! || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))
! /* If the type and the field are a constant size and the
! size of the type isn't the same size as the bitfield,
! we must use bitfield operations. */
! || ((bitsize >= 0
! && (TREE_CODE (TYPE_SIZE (TREE_TYPE (exp)))
! == INTEGER_CST)
! && ((TREE_INT_CST_HIGH (TYPE_SIZE (TREE_TYPE (exp)))
! != 0)
! || (TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (exp)))
! != bitsize))))))
|| (modifier != EXPAND_CONST_ADDRESS
&& modifier != EXPAND_INITIALIZER