mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-04 09:14:04 +08:00
asm-names.c: Use scan-assembler-not rather than linker trickery.
* gcc.dg/asm-names.c: Use scan-assembler-not rather than linker trickery. From-SVN: r72447
This commit is contained in:
parent
88e451e1e7
commit
71d46c6f91
@ -1,3 +1,8 @@
|
|||||||
|
2003-10-13 Geoffrey Keating <geoffk@apple.com>
|
||||||
|
|
||||||
|
* gcc.dg/asm-names.c: Use scan-assembler-not rather
|
||||||
|
than linker trickery.
|
||||||
|
|
||||||
2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||||
|
|
||||||
PR c++/12370
|
PR c++/12370
|
||||||
|
@ -2,28 +2,15 @@
|
|||||||
to have an underscore prefixed, even if normal symbols are.
|
to have an underscore prefixed, even if normal symbols are.
|
||||||
Problem reported by Krister Walfridsson <cato@df.lth.se>. */
|
Problem reported by Krister Walfridsson <cato@df.lth.se>. */
|
||||||
|
|
||||||
/* { dg-do link } */
|
/* { dg-do compile } */
|
||||||
/* { dg-options "-fleading-underscore" } */
|
/* { dg-options "-fleading-underscore" } */
|
||||||
|
/* { dg-final { scan-assembler-not "____frob14" } } */
|
||||||
|
|
||||||
extern void frobnicate (void) asm ("___frob14"); /* three underscores */
|
extern void frobnicate (void) asm ("___frob14"); /* three underscores */
|
||||||
|
|
||||||
void __frob14 (void) {} /* two underscores */
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
frobnicate ();
|
frobnicate ();
|
||||||
return 0;
|
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(); }
|
|
||||||
|
|
||||||
/* In case built where the runtime calls __main. */
|
|
||||||
/* But make it weak because some targets already define this function. */
|
|
||||||
#pragma weak ymain
|
|
||||||
extern int ymain (void) asm ("___main");
|
|
||||||
int ymain (void) { return main(); }
|
|
||||||
|
Loading…
Reference in New Issue
Block a user