diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1995-05-11 13:37:44 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1995-05-11 13:37:44 +0000 |
commit | 08664dffb263afea1de2501309830fbe10ca1fcc (patch) | |
tree | 82d4a545bbe9c712044059cf22ba6442c82e62da /gcc | |
parent | 201012cbf98c4d5fa8f8756cd78c26096289240a (diff) | |
download | gcc-08664dffb263afea1de2501309830fbe10ca1fcc.zip gcc-08664dffb263afea1de2501309830fbe10ca1fcc.tar.gz gcc-08664dffb263afea1de2501309830fbe10ca1fcc.tar.bz2 |
Do not segfault if SUBREG uses something other than REG.
From-SVN: r9617
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/flow.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2382,6 +2382,13 @@ mark_used_regs (needed, live, x, final, insn) != GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))) reg_changes_size[REGNO (SUBREG_REG (x))] = 1; + /* In case the SUBREG is not of a register, don't optimize */ + if (GET_CODE (SUBREG_REG (x)) != REG) + { + mark_used_regs (needed, live, SUBREG_REG (x), final, insn); + return; + } + /* While we're here, optimize this case. */ x = SUBREG_REG (x); |