Closed GoogleCodeExporter closed 8 years ago
Test Case:
see the atteched file. m.c and mm.acc
to run the test simply type:
>tacc m.c mm.acc //tacc compile m.c and mm.acc
>./a.out
Expected Output:
calling foo
a is '2'
calling foo
a is '3'
since function foo is called by the function pointer pt2Fun.
Actual Output:
a is '2'
calling foo
a is '3'
The first call of function foo is not taking in consider by the compiler.
Therefore, there is an error occur.
Original comment by kedeng1...@gmail.com
on 13 May 2010 at 9:38
Attachments:
Original comment by lzmliz...@gmail.com
on 14 May 2010 at 3:56
This problem can be resolved by callp() instead of call(). callp() is for
function
pointers and call() is for direct call to the function.
If you want to execute code in ACC when a function is called through both
function
pointer and direct calls, you can use lines like:
before(): callp(int foo(int)) || call(int foo(int))
to solve the problem.
Original comment by lzmliz...@gmail.com
on 18 May 2010 at 8:36
Original issue reported on code.google.com by
lzmliz...@gmail.com
on 13 May 2010 at 7:40