analyzer: fix ICE converting float to int [PR96699]
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 19 Aug 2020 09:00:52 +0000 (05:00 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 19 Aug 2020 19:24:42 +0000 (15:24 -0400)
commit366bd1ac01a5249a463e64234674ad2d174faa9a
tree8ff83e0de43597cebad2bcda620a4c28a3fb91fd
parent07d456bb80a16405723c98c2ab74ccc2a5a23898
analyzer: fix ICE converting float to int [PR96699]

gcc/analyzer/ChangeLog:
PR analyzer/96699
* region-model-manager.cc
(region_model_manager::get_or_create_cast): Use FIX_TRUNC_EXPR for
casting from REAL_TYPE to INTEGER_TYPE.

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