From: Richard Kenner Date: Fri, 18 Aug 2000 20:52:28 +0000 (+0000) Subject: stor-layout.c (compute_record_type): Don't use mode of single field as mode of record... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d2950e52384ed32ca712f28460645d8ca35c97f;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48bed93a6bd..2b97062c8dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -6,13 +6,14 @@ Fri Aug 18 16:22:20 2000 Alexandre Oliva * configure.in: Get them included with `tm_file's. * configure: Rebuilt. -Fri Aug 18 16:01:18 2000 Alexandre Oliva - * config/sh/sh.md (fpu_switch0, fpu_switch1): Simplify. * config/sh/sh.c (fpscr_set_from_mem): Use them. Fri Aug 18 14:23:18 2000 Richard Kenner + * stor-layout.c (compute_record_type): Don't use mode of single + field as mode of record if not integer mode of same type. + * regmove.c (perhaps_ends_bb_p): New function. (optimize_reg_copy_1, optimize_reg_copy_2): Call it. (optimize_reg_copy_3, fixup_match_2, regmove_optimize): Likewise. 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