]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.dg/asm-names.c
* spew.c (yylex): Correct handling of friends.
[gcc.git] / gcc / testsuite / gcc.dg / asm-names.c
1 /* The name specified by an asm("...") suffix on a declaration is not
2 to have an underscore prefixed, even if normal symbols are.
3 Problem reported by Krister Walfridsson <cato@df.lth.se>. */
4
5 /* { dg-do link } */
6 /* { dg-options "-fleading-underscore" } */
7
8 extern void frobnicate (void) asm ("___frob14"); /* three underscores */
9
10 void __frob14 (void) {} /* two underscores */
11
12 int
13 main (void)
14 {
15 frobnicate ();
16 return 0;
17 }
18
19 /* In case built where the runtime expects no leading underscore on
20 main(). */
21 extern int xmain (void) asm ("main");
22
23 int xmain (void) { return main(); }
This page took 0.072176 seconds and 5 git commands to generate.