8sa1-gcc/gcc/testsuite/gcc.dg/asm-names.c
Zack Weinberg 8f820299e3 varasm.c (make_decl_rtl): Restore leading star on DECL_ASSEMBLER_NAME set for decls with an asmspec.
* varasm.c (make_decl_rtl): Restore leading star on
	DECL_ASSEMBLER_NAME set for decls with an asmspec.
	* gcc.dg/asm-names.c: New test.

From-SVN: r36309
2000-09-11 05:44:51 +00:00

24 lines
594 B
C

/* The name specified by an asm("...") suffix on a declaration is not
to have an underscore prefixed, even if normal symbols are.
Problem reported by Krister Walfridsson <cato@df.lth.se>. */
/* { dg-do link } */
/* { dg-options "-fleading-underscore" } */
extern void frobnicate (void) asm ("___frob14"); /* three underscores */
void __frob14 (void) {} /* two underscores */
int
main (void)
{
frobnicate ();
return 0;
}
/* In case built where the runtime expects no leading underscore on
main(). */
extern int xmain (void) asm ("main");
int xmain (void) { return main(); }