diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-03-11 22:58:43 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-03-11 22:58:43 +0100 |
commit | 4f150726cf236755158c3d895a31b4216336fae7 (patch) | |
tree | 0b67df4f562bcc679f0b483d8037998b7b62cdad /gcc/vr-values.c | |
parent | 011acc898923f2511fc4ac2cbd21903cfe297a55 (diff) |
re PR middle-end/89655 (GCC crashes building linux kernel for arm 32-bit (culprit r269453))
PR middle-end/89655
PR bootstrap/89656
* vr-values.c (vr_values::update_value_range): If
old_vr->varying_p (), don't update it, make new_vr also VARYING
and return false.
* gcc.c-torture/compile/pr89655.c: New test.
From-SVN: r269597
Diffstat (limited to 'gcc/vr-values.c')
-rw-r--r-- | gcc/vr-values.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/vr-values.c b/gcc/vr-values.c index a734ef93f3d..0e10aca92bb 100644 --- a/gcc/vr-values.c +++ b/gcc/vr-values.c @@ -189,8 +189,13 @@ vr_values::update_value_range (const_tree var, value_range *new_vr) because VR_RANGE and VR_ANTI_RANGE need to be considered the same. We may not have is_new when transitioning to UNDEFINED. If old_vr->type is VARYING, we shouldn't be - called. */ - if (new_vr->undefined_p ()) + called, if we are anyway, keep it VARYING. */ + if (old_vr->varying_p ()) + { + new_vr->set_varying (); + is_new = false; + } + else if (new_vr->undefined_p ()) { old_vr->set_varying (); new_vr->set_varying (); |