1 /* { dg-do compile } */
2 /* { dg-require-effective-target naked_functions } */
3 /* { dg-options "-O2 -Wall" } */
4 extern void bar();
5 
6 void __attribute__((__naked__))
foo(void)7 foo(void)
8 {
9   bar ();
10 }
11 
12 int __attribute__((naked))
zoo(int a,int b,int c,int d,int e,int f)13 zoo (int a, int b, int c, int d, int e, int f)
14 {
15   bar ();
16   return e;
17 }
18 /* Verify that __attribute__((naked)) produces a naked function that
19    does not use bx to return. */
20 /* { dg-final { scan-assembler-not "\tbx\tlr" } } */
21