pr47276.c (ASMNAME, [...]): Define.
authorJoern Rennecke <joern.rennecke@embecosm.com>
Fri, 7 Oct 2011 13:52:17 +0000 (13:52 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Fri, 7 Oct 2011 13:52:17 +0000 (14:52 +0100)
        * gcc.dg/pr47276.c (ASMNAME, ASMNAME2, STRING): Define.
        (__EI___vsyslog_chk, __EI_syslog, __EI_vsyslog): Use ASMNAME.
        (syslog, vsyslog, __vsyslog_chk): Likewise.

        * gcc.dg/lto/20081222_1.c (ASMNAME, ASMNAME2, STRING): Define.
        (x, EXT_x): Use ASMNAME.

        * gcc.dg/torture/pr48044.c (ASMNAME, ASMNAME2, STRING): Define.
        (a, c): Use ASMNAME.

From-SVN: r179659

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/20081222_1.c
gcc/testsuite/gcc.dg/pr47276.c
gcc/testsuite/gcc.dg/torture/pr48044.c

index bedf1a073d512ee0e1cabc8e49a9d0c9ac6b8361..92ae8b340a9ff724e30637726223186b1f3fcace 100644 (file)
@@ -1,3 +1,15 @@
+2011-10-06  Joern Rennecke <joern.rennecke@embecosm.com>
+
+       * gcc.dg/pr47276.c (ASMNAME, ASMNAME2, STRING): Define.
+       (__EI___vsyslog_chk, __EI_syslog, __EI_vsyslog): Use ASMNAME.  
+       (syslog, vsyslog, __vsyslog_chk): Likewise.
+
+       * gcc.dg/lto/20081222_1.c (ASMNAME, ASMNAME2, STRING): Define.
+       (x, EXT_x): Use ASMNAME.
+
+       * gcc.dg/torture/pr48044.c (ASMNAME, ASMNAME2, STRING): Define.
+       (a, c): Use ASMNAME.
+
 2011-10-07  Tom de Vries  <tom@codesourcery.com>
 
        PR middle-end/50527
index e8f9254421be0c948932a2b4ae5866f66a78b3ce..755eb9918e9a9300229a00a5a647a171a78b9ff1 100644 (file)
@@ -1,8 +1,12 @@
 #include "20081222_0.h"
 
+#define ASMNAME(cname)  ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) STRING (prefix) cname
+#define STRING(x)    #x
+
 /* Actually, call "x" "INT_X", and make it hidden.  */
 extern __typeof (x) x
-       __asm__ ("INT_x")
+       __asm__ (ASMNAME ("INT_x"))
        __attribute__ ((__visibility__ ("hidden")));
 
 int x ()
@@ -12,5 +16,5 @@ int x ()
 
 /* Make an externally-visible symbol "X" that's an alias for INT_x.  */
 extern __typeof (x) EXT_x
-       __asm__ ("x")
+       __asm__ (ASMNAME ("x"))
        __attribute__ ((__alias__ ("INT_x")));
index 3fa1a0e49a87eb9c51a1d9dfee9cf0da46ab72b7..9276b1a68542d972ae5ac50eaf0cb9d5017c23f3 100644 (file)
@@ -1,6 +1,11 @@
 /* { dg-do compile } */
 /* { dg-require-alias "" } */
 /* { dg-require-visibility "" } */
+
+#define ASMNAME(cname)  ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) STRING (prefix) cname
+#define STRING(x)    #x
+
 extern void syslog (int __pri, __const char *__fmt, ...)
      __attribute__ ((__format__ (__printf__, 2, 3)));
 extern void vsyslog (int __pri, __const char *__fmt, int __ap)
@@ -17,15 +22,15 @@ void
 __vsyslog_chk(int pri, int flag, const char *fmt, int ap)
 {
 }
-extern __typeof (__vsyslog_chk) __EI___vsyslog_chk __asm__("" "__vsyslog_chk"); extern __typeof (__vsyslog_chk) __EI___vsyslog_chk __attribute__((alias ("" "__GI___vsyslog_chk")));
+extern __typeof (__vsyslog_chk) __EI___vsyslog_chk __asm__("" ASMNAME ("__vsyslog_chk")); extern __typeof (__vsyslog_chk) __EI___vsyslog_chk __attribute__((alias ("" "__GI___vsyslog_chk")));
 void
 __syslog(int pri, const char *fmt, ...)
 {
 }
 extern __typeof (__syslog) syslog __attribute__ ((alias ("__syslog")));
-extern __typeof (syslog) __EI_syslog __asm__("" "syslog"); extern __typeof (syslog) __EI_syslog __attribute__((alias ("" "__GI_syslog")));
+extern __typeof (syslog) __EI_syslog __asm__("" ASMNAME ("syslog")); extern __typeof (syslog) __EI_syslog __attribute__((alias ("" "__GI_syslog")));
 extern __typeof (__vsyslog) vsyslog __attribute__ ((alias ("__vsyslog")));
-extern __typeof (vsyslog) __EI_vsyslog __asm__("" "vsyslog"); extern __typeof (vsyslog) __EI_vsyslog __attribute__((alias ("" "__GI_vsyslog")));
-extern __typeof (syslog) syslog __asm__ ("" "__GI_syslog") __attribute__ ((visibility ("hidden")));
-extern __typeof (vsyslog) vsyslog __asm__ ("" "__GI_vsyslog") __attribute__ ((visibility ("hidden")));
-extern __typeof (__vsyslog_chk) __vsyslog_chk __asm__ ("" "__GI___vsyslog_chk") __attribute__ ((visibility ("hidden")));
+extern __typeof (vsyslog) __EI_vsyslog __asm__("" ASMNAME ("vsyslog")); extern __typeof (vsyslog) __EI_vsyslog __attribute__((alias ("" "__GI_vsyslog")));
+extern __typeof (syslog) syslog __asm__ ("" ASMNAME ("__GI_syslog")) __attribute__ ((visibility ("hidden")));
+extern __typeof (vsyslog) vsyslog __asm__ ("" ASMNAME ("__GI_vsyslog")) __attribute__ ((visibility ("hidden")));
+extern __typeof (__vsyslog_chk) __vsyslog_chk __asm__ ("" ASMNAME ("__GI___vsyslog_chk")) __attribute__ ((visibility ("hidden")));
index fe3b73402cc3ba1d2a3f19877dbc05950208b59f..d20a634a1199c1e82579a9f0a96ac9a8dc054be6 100644 (file)
@@ -2,6 +2,10 @@
 /* { dg-do compile } */
 /* { dg-require-alias "" } */
 
-int a __asm__ ("b") = 0;
-extern int c __asm__ ("a") __attribute__ ((alias ("b")));
+#define ASMNAME(cname)  ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) STRING (prefix) cname
+#define STRING(x)    #x
+
+int a __asm__ (ASMNAME ("b")) = 0;
+extern int c __asm__ (ASMNAME ("a")) __attribute__ ((alias ("b")));
 extern int d __attribute__ ((weak, alias ("a")));