diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2000-08-18 20:52:28 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2000-08-18 16:52:28 -0400 |
commit | 7d2950e52384ed32ca712f28460645d8ca35c97f (patch) | |
tree | 31572fbfb97907694857f7d3f1dc930961285940 /gcc/stor-layout.c | |
parent | 26db254445dc48d8b836758bdd8464923353f1e7 (diff) | |
download | gcc-7d2950e52384ed32ca712f28460645d8ca35c97f.zip gcc-7d2950e52384ed32ca712f28460645d8ca35c97f.tar.gz gcc-7d2950e52384ed32ca712f28460645d8ca35c97f.tar.bz2 |
stor-layout.c (compute_record_type): Don't use mode of single field as mode of record if not integer mode of same type.
* stor-layout.c (compute_record_type): Don't use mode of single
field as mode of record if not integer mode of same type.
From-SVN: r35796
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 159e2a8..294f2d4 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 |