arm64 front end: ufbm/sfbm: handle plain shifts explicitly
[valgrind.git] / none / tests / nestedfns.c
blob8513ec5a16afe1b221c6fe80f9ee9459872af7d6
2 /* This is a test program from Lee Kindness which used to fail on V
3 because gcc implements the nested function mumbo jumbo using self
4 modifying code on the stack, at least on x86 and amd64. It now
5 works transparently because by default V now generates
6 self-checking translations for translations taken from stack-like
7 segments.
8 */
10 #include <stdio.h>
12 static void call_func(void (*sel)(void))
14 sel();
17 void test1()
19 void test1_inner()
21 printf( "Inside test1\n" );
23 call_func( test1_inner );
26 void test2()
28 void test2_inner()
30 printf( "Inside test2\n" );
32 call_func( test2_inner );
35 int main(int argc, char** argv)
37 test1();
38 test2();
39 return( 0 );