diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-18 20:52:28 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-18 20:52:28 +0000 |
commit | 9e21d07d5de53b0072972a016f3ccaae1d0ca2d4 (patch) | |
tree | 31572fbfb97907694857f7d3f1dc930961285940 /gcc/stor-layout.c | |
parent | cc4097c167780ee1bc1cd89ab11c1840b8e93a12 (diff) | |
download | gcc-9e21d07d5de53b0072972a016f3ccaae1d0ca2d4.tar.gz |
* stor-layout.c (compute_record_type): Don't use mode of single
field as mode of record if not integer mode of same type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35796 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 159e2a8551f..294f2d400ed 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1062,8 +1062,11 @@ compute_record_mode (type) /* If this field is the whole struct, remember its mode so that, say, we can put a double in a class into a DF - register instead of forcing it to live in the stack. */ - if (field == TYPE_FIELDS (type) && TREE_CHAIN (field) == 0) + register instead of forcing it to live in the stack. However, + we don't support using such a mode if there is no integer mode + of the same size, so don't set it here. */ + if (field == TYPE_FIELDS (type) && TREE_CHAIN (field) == 0 + && int_mode_for_mode (DECL_MODE (field)) != BLKmode) mode = DECL_MODE (field); #ifdef STRUCT_FORCE_BLK |