File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
regression/cbmc/unwindset2 Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change
1
+ int main ()
2
+ {
3
+ // clang-format off
4
+ for_loop : for (int i = 0 ; i < 5 ; ++ i ) { while (i < 5 ) ++ i ; }
5
+ // clang-format on
6
+ return 0 ;
7
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --unwindset main.for_loop:2 --unwinding-assertions
4
+ ^loop identifier main.for_loop provided with unwindset is ambiguous$
5
+ ^VERIFICATION SUCCESSFUL$
6
+ ^EXIT=0$
7
+ ^SIGNAL=0$
8
+ --
9
+ ^warning: ignoring
Original file line number Diff line number Diff line change @@ -134,8 +134,14 @@ void unwindsett::parse_unwindset_one_loop(
134
134
location.has_value () && instruction.is_backwards_goto () &&
135
135
instruction.source_location () == *location)
136
136
{
137
+ if (nr.has_value ())
138
+ {
139
+ messaget log{message_handler};
140
+ log.warning ()
141
+ << " loop identifier " << id
142
+ << " provided with unwindset is ambiguous" << messaget::eom;
143
+ }
137
144
nr = instruction.loop_number ;
138
- break ;
139
145
}
140
146
}
141
147
if (!nr.has_value ())
You can’t perform that action at this time.
0 commit comments