diff options
| author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-03 20:40:54 +0000 |
|---|---|---|
| committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-03 20:40:54 +0000 |
| commit | b28f7c3bee4d9c4e73d449662e9b219450c878aa (patch) | |
| tree | 4aaf0e38a459bfc3df645507b38bfe189bb6dac3 /gcc/expr.c | |
| parent | f19c105bc26c979de84c27d967cbdbdfc0d390e0 (diff) | |
| download | ppe42-gcc-b28f7c3bee4d9c4e73d449662e9b219450c878aa.tar.gz ppe42-gcc-b28f7c3bee4d9c4e73d449662e9b219450c878aa.zip | |
* expr.c (expand_expr, case COMPONENT_REF): Use bitfield case if
result is a RECORD_TYPE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32317 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
| -rw-r--r-- | gcc/expr.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index b0d1e078d5e..fb266e27226 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -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 |

