gcc.dg/lto/pr46940_0.c needs fixing for targets using a prefix on
assembler names, similar to the fixes recently made by Joern to some
other testcases.  This patch fixes it in the same way as Joern fixed
gcc.dg/lto/20081222_1.c.

Testes with cross to i686-mingw32.  OK to commit?

2011-10-20  Joseph Myers  <jos...@codesourcery.com>

        * gcc.dg/lto/pr46940_0.c (ASMNAME, ASMNAME2, STRING): Define.
        (_moz_foo, EXT__foo): Use ASMNAME.

Index: gcc/testsuite/gcc.dg/lto/pr46940_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/pr46940_0.c        (revision 180200)
+++ gcc/testsuite/gcc.dg/lto/pr46940_0.c        (working copy)
@@ -2,10 +2,14 @@
 /* { dg-extra-ld-options "-fuse-linker-plugin" } */
 #include <stdio.h>
 
+#define ASMNAME(cname)  ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) STRING (prefix) cname
+#define STRING(x)    #x
+
 extern __attribute__((visibility("hidden"))) void _moz_foo (void);
-extern __typeof (_moz_foo) _moz_foo __asm__ ("" "INT__foo") 
__attribute__((__visibility__("hidden"))) ;
+extern __typeof (_moz_foo) _moz_foo __asm__ (ASMNAME ("INT__foo")) 
__attribute__((__visibility__("hidden"))) ;
 void _moz_foo(void)
 {
   printf ("blah\n");
 }
-extern __typeof (_moz_foo) EXT__foo __asm__("" "_moz_foo") 
__attribute__((__alias__("" "INT__foo")));
+extern __typeof (_moz_foo) EXT__foo __asm__(ASMNAME ("_moz_foo")) 
__attribute__((__alias__("" "INT__foo")));

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to