diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-09-24 08:13:52 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-09-24 08:13:52 -0400 |
commit | 2d0bd5fde06d1538ee95376c0b41a598feb9579d (patch) | |
tree | 208f1d29cde0e4a846cdbb95d25bc2b9f0695cbd /gcc/integrate.c | |
parent | f2662b08c72e8b3bdd130409bd553cd4eb85a94b (diff) | |
download | gcc-2d0bd5fde06d1538ee95376c0b41a598feb9579d.tar.gz |
(expand_inline_function): Avoid creating paradoxical subreg wider than
BITS_PER_WORD as inlined function result.
From-SVN: r12832
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index f1e778a81d8..1c5a4a7dd63 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1673,7 +1673,21 @@ expand_inline_function (fndecl, parms, target, ignore, type, avoid machine mode mismatch when we substitute INLINE_TARGET. But TARGET is what we will return to the caller. */ if (arriving_mode != departing_mode) - reg_to_map = gen_rtx (SUBREG, arriving_mode, target, 0); + { + /* Avoid creating a paradoxical subreg wider than + BITS_PER_WORD, since that is illegal. */ + if (GET_MODE_BITSIZE (arriving_mode) > BITS_PER_WORD) + { + if (!TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (departing_mode), + GET_MODE_BITSIZE (arriving_mode))) + /* Maybe could be handled by using convert_move () ? */ + abort (); + reg_to_map = gen_reg_rtx (arriving_mode); + target = gen_lowpart (departing_mode, reg_to_map); + } + else + reg_to_map = gen_rtx (SUBREG, arriving_mode, target, 0); + } else reg_to_map = target; |