Skip to content

Commit 78ba749

Browse files
authored
Merge pull request #5682 from tautschnig/no-propagation
goto_symext::apply_goto_condition must honour --no-propagation
2 parents 431acd6 + 939da28 commit 78ba749

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

regression/cbmc/no-propagation/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
int main()
2+
{
3+
int x;
4+
if(x == 1)
5+
__CPROVER_assert(x == 1, "");
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
main.c
3+
--no-propagation
4+
Generated 1 VCC\(s\), 1 remaining after simplification
5+
^VERIFICATION SUCCESSFUL$
6+
^EXIT=0$
7+
^SIGNAL=0$
8+
--
9+
^warning: ignoring

src/goto-symex/symex_goto.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ void goto_symext::apply_goto_condition(
5353
&jump_not_taken_state.value_set,
5454
ns);
5555

56+
if(!symex_config.constant_propagation)
57+
return;
58+
5659
jump_taken_state.apply_condition(new_guard, current_state, ns);
5760

5861
// Could use not_exprt + simplify, but let's avoid paying that cost on quite

0 commit comments

Comments
 (0)