diff options
Diffstat (limited to 'testsuite/systemtap.base/const_value_func.c')
-rw-r--r-- | testsuite/systemtap.base/const_value_func.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/const_value_func.c b/testsuite/systemtap.base/const_value_func.c new file mode 100644 index 00000000..23f2f0bc --- /dev/null +++ b/testsuite/systemtap.base/const_value_func.c @@ -0,0 +1,22 @@ +#include "sdt.h" + +static int +bar (int i, long j) +{ + return i * j; +} + +static int +func (int (*f) ()) +{ + volatile int i = 2; + volatile long j = 21; + STAP_PROBE (test, constvalues); + return f(i, j); +} + +int +main (int argc, char *argv[], char *envp[]) +{ + return func (&bar) - 42; +} |