diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2000-03-03 20:40:54 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2000-03-03 15:40:54 -0500 |
commit | dd8411811438d608ab8a13834abc4b62bb59442f (patch) | |
tree | 4aaf0e38a459bfc3df645507b38bfe189bb6dac3 /gcc/expr.c | |
parent | 105d228299a25eb8990e33d998ab0c9b30dea4c1 (diff) | |
download | gcc-dd8411811438d608ab8a13834abc4b62bb59442f.zip gcc-dd8411811438d608ab8a13834abc4b62bb59442f.tar.gz gcc-dd8411811438d608ab8a13834abc4b62bb59442f.tar.bz2 |
expr.c (expand_expr, [...]): Use bitfield case if result is a RECORD_TYPE.
* expr.c (expand_expr, case COMPONENT_REF): Use bitfield case if
result is a RECORD_TYPE.
From-SVN: r32317
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -6756,7 +6756,17 @@ expand_expr (exp, target, tmode, modifier) && SLOW_UNALIGNED_ACCESS (mode1, alignment) && ((TYPE_ALIGN (TREE_TYPE (tem)) < (unsigned int) GET_MODE_ALIGNMENT (mode)) - || (bitpos % GET_MODE_ALIGNMENT (mode) != 0))))) + || (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 && mode == BLKmode |