File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
regression/goto-instrument/restrict-function-pointer-goto-target Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <assert.h>
2+
3+ typedef void (* fp_t )();
4+
5+ void f ()
6+ {
7+ }
8+
9+ int main (void )
10+ {
11+ fp_t fp = f ;
12+ goto L ;
13+
14+ L :
15+ fp ();
16+ }
Original file line number Diff line number Diff line change 1+ KNOWNBUG
2+ test.c
3+ --restrict-function-pointer main.function_pointer_call.1/f
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ \[main.assertion.1\] line \d+ dereferenced function pointer at main.function_pointer_call.1 must be f: SUCCESS
7+ --
8+ --
9+ This test checks that a function pointer call that is the target of a goto (in
10+ the goto program) is correctly handled. Currently there is a bug, as the
11+ function pointer labelling step which is part of the restrict function pointer
12+ feature inserts a new instructions before the function pointer calls, but does
13+ not adjust the goto targets.
You can’t perform that action at this time.
0 commit comments