diff options
author | Jeffrey A Law <law@cygnus.com> | 2000-08-03 07:16:39 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-08-03 01:16:39 -0600 |
commit | 66ed03f845c35c5b869534036d4dc1332f23452c (patch) | |
tree | bcf043747af6b973e682ef85917025765b46713b /gcc/flow.c | |
parent | 860cd40a95e8376547675be8e71bbc0bb554721a (diff) | |
download | gcc-66ed03f845c35c5b869534036d4dc1332f23452c.zip gcc-66ed03f845c35c5b869534036d4dc1332f23452c.tar.gz gcc-66ed03f845c35c5b869534036d4dc1332f23452c.tar.bz2 |
flow.c (find_auto_inc): Verify that we've got a REG before peeking at its regno.
* flow.c (find_auto_inc): Verify that we've got a REG before
peeking at its regno. Fail, don't abort if we can't find
the increment of the desired register.
From-SVN: r35443
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5018,12 +5018,12 @@ find_auto_inc (pbi, x, insn) if (GET_CODE (y) != PLUS) return; - if (REGNO (XEXP (y, 0)) == REGNO (addr)) + if (REG_P (XEXP (y, 0)) && REGNO (XEXP (y, 0)) == REGNO (addr)) inc_val = XEXP (y, 1); - else if (REGNO (XEXP (y, 1)) == REGNO (addr)) + else if (REG_P (XEXP (y, 1)) && REGNO (XEXP (y, 1)) == REGNO (addr)) inc_val = XEXP (y, 0); else - abort (); + return; if (GET_CODE (inc_val) == CONST_INT) { |