PR target/83368
[official-gcc.git] / gcc / testsuite / c-c++-common / patchable_function_entry-decl.c
blobfb61ac31795fb7a1ca946c89e3e189a2e5c6b45d
1 /* { dg-do compile { target { ! nvptx*-*-* } } } */
2 /* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
3 /* { dg-final { scan-assembler-times "nop" 2 { target { ! alpha*-*-* } } } } */
4 /* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */
6 extern int a;
8 /* Respect overriding attributes in the declaration. */
9 int f3 (void) __attribute__((patchable_function_entry(2)));
11 /* F3 should now get 2 NOPs. */
12 int
13 __attribute__((noinline))
14 f3 (void)
16 return 5*a;