diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/patchable_function_entry-default.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/patchable_function_entry-default.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c new file mode 100644 index 00000000000..0dcf1181dde --- /dev/null +++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */ +/* { dg-final { scan-assembler-times "nop" 3 } } */ + +extern int a; + +/* Nothing declared must not mean anything. */ +int f3 (void); + +/* F3 should get a default-sized NOP area. */ +int +__attribute__((noinline)) +f3 (void) +{ + return 5*a; +} |