Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / arc / naked-2.c
blob7b7262f791677e5847e73302d6ca615c477b0b8a
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'. */
6 #if defined(__HS__) || defined(__EM__)
7 # define ILINK "ilink"
8 #else
9 # define ILINK "ilink1"
10 #endif
12 extern void bar (int);
14 void __attribute__((naked, interrupt(ILINK)))
15 foo (int n, int m)
17 bar (n + m);
19 /* { dg-final { scan-assembler "\tbl @bar" } } */
21 /* Look for things that would appear in a non-naked function, but which
22 should not appear in a naked function. */
23 /* { dg-final { scan-assembler-not "\trtie" } } */
24 /* { dg-final { scan-assembler-not "j.*\[ilink1\]" } } */
25 /* { dg-final { scan-assembler-not "\tst.* " } } */
26 /* { dg-final { scan-assembler-not "\tmov fp,sp" } } */