2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gcc.target / arc / naked-1.c
blobe45f433f73cdf807559daee0462eacccb7ce064a
1 /* { dg-do compile } */
2 /* { dg-options "-O0" } */
3 /* Check that naked functions don't place arguments on the stack at
4 optimisation level '-O0'. */
5 extern void bar (int);
7 void __attribute__((naked))
8 foo (int n, int m)
10 bar (n + m);
12 /* { dg-final { scan-assembler "\tbl @bar" } } */
14 /* Look for things that would appear in a non-naked function, but which
15 should not appear in a naked function. */
16 /* { dg-final { scan-assembler-not "\tj.* \\\[blink\\\]" } } */
17 /* { dg-final { scan-assembler-not "\tst.* " } } */
18 /* { dg-final { scan-assembler-not "\tmov fp,sp" } } */