diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2009-11-12 08:30:05 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2009-11-12 08:30:05 +0100 |
commit | 8a1eb57b7dd9cb403765eb9c4a401e0687d215de (patch) | |
tree | 9b992f0744c5928eb8918d446171b3cfd011a7c2 /gcc/simplify-rtx.c | |
parent | fcc993f6f58f66f6d34bf3de8da27bf9f34680c7 (diff) | |
download | gcc-8a1eb57b7dd9cb403765eb9c4a401e0687d215de.zip gcc-8a1eb57b7dd9cb403765eb9c4a401e0687d215de.tar.gz gcc-8a1eb57b7dd9cb403765eb9c4a401e0687d215de.tar.bz2 |
re PR middle-end/41930 (cc1 SEGV compiling maxval_r16.c)
PR middle-end/41930
* simplify-rtx.c (simplify_replace_fn_rtx) <case 'e'>: Skip
processing if XEXP (x, i) is NULL.
From-SVN: r154116
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index ee119bc..c042777 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -489,12 +489,15 @@ simplify_replace_fn_rtx (rtx x, const_rtx old_rtx, break; case 'e': - op = simplify_replace_fn_rtx (XEXP (x, i), old_rtx, fn, data); - if (op != XEXP (x, i)) + if (XEXP (x, i)) { - if (x == newx) - newx = shallow_copy_rtx (x); - XEXP (newx, i) = op; + op = simplify_replace_fn_rtx (XEXP (x, i), old_rtx, fn, data); + if (op != XEXP (x, i)) + { + if (x == newx) + newx = shallow_copy_rtx (x); + XEXP (newx, i) = op; + } } break; } |