File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
regression/goto-instrument/constant_propagator_unreachable Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+
3+ void unreachable (void )
4+ {
5+ int x = 0 ;
6+ assert (x != 0 );
7+ }
8+
9+ int main (void )
10+ {
11+ return 0 ;
12+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ test.c
3+ --constant-propagator
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ VERIFICATION SUCCESSFUL
7+ --
8+ failed to find state
9+ --
10+ This is testing for a previous regression that caused constant propagation to
11+ fail in unreachable code
Original file line number Diff line number Diff line change @@ -751,8 +751,10 @@ void constant_propagator_ait::replace(
751751{
752752 Forall_goto_program_instructions (it, goto_function.body )
753753 {
754- // Works because this is a location (but not history) sensitive domain
755- const constant_propagator_domaint &d = (*this )[it];
754+ auto const current_domain_ptr =
755+ std::dynamic_pointer_cast<const constant_propagator_domaint>(
756+ this ->abstract_state_before (it));
757+ const constant_propagator_domaint &d = *current_domain_ptr;
756758
757759 if (d.is_bottom ())
758760 continue ;
You can’t perform that action at this time.
0 commit comments