analyzer: fix ICE on RANGE_EXPR in CONSTRUCTORs [PR96763]
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 24 Aug 2020 13:33:42 +0000 (09:33 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 31 Aug 2020 20:07:46 +0000 (16:07 -0400)
commit0d1b4edc5fff834e8f924b20dd021ded7a21d2d2
tree65926af7487d5485acfedf8ed468b9b52073f5fe
parentecdb93224c56189a129e97c556fe6b78e1b15a63
analyzer: fix ICE on RANGE_EXPR in CONSTRUCTORs [PR96763]

gcc/analyzer/ChangeLog:
PR analyzer/96763
* store.cc (binding_map::apply_ctor_to_region): Handle RANGE_EXPR
by calling a new binding_map::apply_ctor_val_to_range subroutine.
Split out the existing non-CONSTRUCTOR-handling code to a new
apply_ctor_pair_to_child_region subroutine.
(binding_map::apply_ctor_val_to_range): New.
(binding_map::apply_ctor_pair_to_child_region): New, split out
from binding_map::apply_ctor_to_region as noted above.
* store.h (binding_map::apply_ctor_val_to_range): New decl.
(binding_map::apply_ctor_pair_to_child_region): New decl.

gcc/testsuite/ChangeLog:
PR analyzer/96763
* g++.dg/analyzer/pr96763.C: New test.
gcc/analyzer/store.cc
gcc/analyzer/store.h
gcc/testsuite/g++.dg/analyzer/pr96763.C [new file with mode: 0644]