Debian Codegraph @

gcc/testsuite/gcc.target/i386/naked-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O0" } */
3 /* { dg-additional-options "-fno-pic" { target { ! *-*-darwin* } } } */
4 /* { dg-additional-options "-mdynamic-no-pic" { target { *-*-darwin* && ia32 } } } */
5
6 /* Verify that __attribute__((naked)) produces a naked function
7 that does not use ret to return but traps at the end. */
8 void
9 __attribute__((naked))
10 foo (void)
11 {
12 __asm__ ("# naked");
13 }
14 /* { dg-final { scan-assembler "# naked" } } */
15 /* { dg-final { scan-assembler "(?n)^\\s*ud2$" } } */
16 /* { dg-final { scan-assembler-not "(?n)^\\s*ret$" } } */