analyzer: fix ICE on folding vector 0 [PR96705]
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 19 Aug 2020 13:27:16 +0000 (09:27 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 19 Aug 2020 19:26:10 +0000 (15:26 -0400)
commitfc02b568e2cd3f6a28d4b7c1063bbf8842c89aad
tree86fb127e6887d951ef3d323ea1074f125c73ddf5
parent366bd1ac01a5249a463e64234674ad2d174faa9a
analyzer: fix ICE on folding vector 0 [PR96705]

gcc/analyzer/ChangeLog:
* region-model-manager.cc
PR analyzer/96705
(region_model_manager::maybe_fold_binop): Check that we have an
integral type before calling build_int_cst.

gcc/testsuite/ChangeLog:
PR analyzer/96705
* gcc.dg/analyzer/pr96705.c: New test.
gcc/analyzer/region-model-manager.cc
gcc/testsuite/gcc.dg/analyzer/pr96705.c [new file with mode: 0644]