Fix consistency error in SSA level 1 renaming

a5bc493713 introduced cases where information in the frame may become
inconsistent with the actual renaming being used, as shown in the regression
test.
This commit is contained in:
Michael Tautschnig 2016-06-05 21:10:21 +02:00
parent 639974d07b
commit 5a775c15c2
3 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,25 @@
inline void foo(int x)
{
}
void bar()
{
foo(0);
}
void foobar()
{
// different argument values must not cause an inconsistency in the
// equation system
foo(0);
bar();
foo(1);
}
int main()
{
foobar();
foobar();
__CPROVER_assert(0, "");
return 0;
}

View File

@ -0,0 +1,8 @@
CORE
main.c
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
--
^warning: ignoring

View File

@ -501,9 +501,9 @@ void goto_symext::locality(
while(state.l1_history.find(l1_name)!=state.l1_history.end())
{
state.level1.increase_counter(l0_name);
++offset;
ssa.set_level_1(frame_nr+offset);
l1_name=ssa.get_identifier();
++offset;
}
// now unique -- store