FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / gcc.dg / asm-names.c
blobdbfa7925427f2aeff6a382e79dd618ad9f83a733
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>. */
5 /* { dg-do link } */
6 /* { dg-options "-fleading-underscore" } */
8 extern void frobnicate (void) asm ("___frob14"); /* three underscores */
10 void __frob14 (void) {} /* two underscores */
12 int
13 main (void)
15 frobnicate ();
16 return 0;
19 /* In case built where the runtime expects no leading underscore on
20 main(). */
21 extern int xmain (void) asm ("main");
23 int xmain (void) { return main(); }
25 /* In case built where the runtime calls __main. */
26 extern int ymain (void) asm ("___main");
27 int ymain (void) { return main(); }