From patchwork Sun Sep 25 12:37:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joern Rennecke X-Patchwork-Id: 116286 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 398E6B6F76 for ; Sun, 25 Sep 2011 22:38:08 +1000 (EST) Received: (qmail 18184 invoked by alias); 25 Sep 2011 12:38:05 -0000 Received: (qmail 18174 invoked by uid 22791); 25 Sep 2011 12:38:04 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, MIME_QP_LONG_LINE X-Spam-Check-By: sourceware.org Received: from c60.cesmail.net (HELO c60.cesmail.net) (216.154.195.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 25 Sep 2011 12:37:40 +0000 Received: from unknown (HELO epsilon2) ([192.168.1.60]) by c60.cesmail.net with ESMTP; 25 Sep 2011 08:37:39 -0400 Received: from host-92-29-223-192.as13285.net (host-92-29-223-192.as13285.net [92.29.223.192]) by webmail.spamcop.net (Horde MIME library) with HTTP; Sun, 25 Sep 2011 08:37:39 -0400 Message-ID: <20110925083739.73ok1i1rdwo488gg-nzlynne@webmail.spamcop.net> Date: Sun, 25 Sep 2011 08:37:39 -0400 From: Joern Rennecke To: gcc-patches@gcc.gnu.org Subject: Ping: RFA: Testsuite fixes (3/3): USER_LABEL_PREFIX MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch has not been reviewed for eight weeks. ----- Forwarded message from amylaar@spamcop.net ----- Date: Mon, 01 Aug 2011 01:01:30 -0400 From: Joern Rennecke Reply-To: Joern Rennecke Subject: RFA: Testsuite fixes (3/3): USER_LABEL_PREFIX To: gcc-patches@gcc.gnu.org We have some new tests that use assembler names without regard to USER_LABEL_PREFIX. These tests fail for targets with non-empty USER_LABEL_PREFIX during the assembly phase. Fixed by using ASMNAME macro like in e.g. gcc.dg/alias-7.c . Regression tested with x86_64-unknown-linux-gnu X sh-elf . This fixes 15 spurious FAILures, giving 27 more expected PASSes. ----- End forwarded message ----- 2011-07-26 Joern Rennecke * 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. Index: gcc.dg/lto/20081222_1.c =================================================================== --- gcc.dg/lto/20081222_1.c (.../GNU/fsf-gcc/trunk/gcc/testsuite) (revision 2013) +++ gcc.dg/lto/20081222_1.c (.../Customer-Projects/X/branches/Y-20110628/toolchain/gcc-4.7.0-20110701/gcc/testsuite) (revision 2013) @@ -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: gcc.dg/torture/pr48044.c =================================================================== --- gcc.dg/torture/pr48044.c (.../GNU/fsf-gcc/trunk/gcc/testsuite) (revision 2013) +++ gcc.dg/torture/pr48044.c (.../Customer-Projects/X/branches/Y-20110628/toolchain/gcc-4.7.0-20110701/gcc/testsuite) (revision 2013) @@ -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"))); Index: gcc.dg/pr47276.c =================================================================== --- gcc.dg/pr47276.c (.../GNU/fsf-gcc/trunk/gcc/testsuite) (revision 2013) +++ gcc.dg/pr47276.c (.../Customer-Projects/X/branches/Y-20110628/toolchain/gcc-4.7.0-20110701/gcc/testsuite) (revision 2013) @@ -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 @@ __syslog_chk(int pri, int flag, const ch __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")));