analyzer: fix another ICE in constructor-handling [PR96949]
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 7 Sep 2020 22:31:28 +0000 (18:31 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 8 Sep 2020 14:51:22 +0000 (10:51 -0400)
commit34d926dba097c4965917d09a3eedec11242c5457
treea81e90bd2416094f975e846aa022e38bd847491e
parentaf656c401e97f9de2a8478f18278e8efb2a6cf23
analyzer: fix another ICE in constructor-handling [PR96949]

PR analyzer/96949 reports an ICE with
--param analyzer-max-svalue-depth=0, where the param value leads
to INTEGER_CST values in a RANGE_EXPR being treated as unknown
symbolic values.

This patch replaces implicit assumptions that these values are
concrete (and thus have concrete bit offsets), adding
error-handling for symbolic cases instead of assertions.

gcc/analyzer/ChangeLog:
PR analyzer/96949
* store.cc (binding_map::apply_ctor_val_to_range): Add
error-handling for the cases where we have symbolic offsets.

gcc/testsuite/ChangeLog:
PR analyzer/96949
* gfortran.dg/analyzer/pr96949.f90: New test.
gcc/analyzer/store.cc
gcc/testsuite/gfortran.dg/analyzer/pr96949.f90 [new file with mode: 0644]