Handle undefined ranges in get_size_range.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 23 Oct 2020 13:54:58 +0000 (15:54 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Sat, 24 Oct 2020 08:38:33 +0000 (10:38 +0200)
commit16e2427f50c208dfe07d07f18009969502c25dc8
tree73a81d852f46e6b10b293b30a1029dbefffde12a
parenta29ff9c53a77b6e208350d8c6db0f3e988f61d1f
Handle undefined ranges in get_size_range.

An undefined range was leaking through to the end of this function,
which leads us to use an uninitialized wide_int.

gcc/ChangeLog:

PR tree-optimization/97538
* calls.c (get_size_range): Handle undefined ranges.

gcc/testsuite/ChangeLog:

* g++.dg/pr97538.C: New test.
gcc/calls.c
gcc/testsuite/g++.dg/pr97538.C [new file with mode: 0644]