diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-01-13 18:43:36 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-01-13 18:43:36 -0500 |
commit | 4013a709018d4579b052a7a19322b2e969aa96a9 (patch) | |
tree | d6e0a0e6f2fafc8dd2af74cfa1462638c186eb71 /gcc | |
parent | 52a1f21f03c0dd7c6c84139871cae7c8190bd912 (diff) | |
download | gcc-4013a709018d4579b052a7a19322b2e969aa96a9.zip gcc-4013a709018d4579b052a7a19322b2e969aa96a9.tar.gz gcc-4013a709018d4579b052a7a19322b2e969aa96a9.tar.bz2 |
(optimize_bit_field): Don't remove a SUBREG that changes mode class.
From-SVN: r8744
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/function.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c index 884cca7..73f59da 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1,5 +1,5 @@ /* Expands front end tree to back end RTL for GNU C-Compiler - Copyright (C) 1987, 88, 89, 91, 92, 93, 1994 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 89, 91-94, 1995 Free Software Foundation, Inc. This file is part of GNU CC. @@ -2318,7 +2318,9 @@ optimize_bit_field (body, insn, equiv_mem) rtx dest = SET_DEST (body); while (GET_CODE (dest) == SUBREG - && SUBREG_WORD (dest) == 0) + && SUBREG_WORD (dest) == 0 + && (GET_MODE_CLASS (GET_MODE (dest)) + == GET_MODE_CLASS (GET_MODE (SUBREG_REG (dest))))) dest = SUBREG_REG (dest); validate_change (insn, &SET_DEST (body), dest, 1); |