From patchwork Mon Dec 29 01:42:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 424349 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AC7AE1400D2 for ; Mon, 29 Dec 2014 12:42:49 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=pO0Ak753uYhiTHI8 gigqBY5DdEqdKF0xSyMT/Vc3mXfD2srDvHCvWV1o8SV76ZXh3MIFWHDuAhYdkgAV NjGcofxXcspOwK+WwzPC7C9zkR4VGyviiby19DV+iQFsY24aGQqNkZCqNuO5QrcI HPKrENn0yNvy74AGiEVeT8jGneA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject:mime-version:content-type :content-transfer-encoding; s=default; bh=66Ns+Mk+Q4lKklC6w7CoRh qrE60=; b=mJC3VwBbsIo7x/4SKR5hPCKuVxno/j6c2omcdAlsJ/aHjl9LaBB4CH RplgfHsNI7HFPMO62Ypg1eTnQr64Dic0clRrGi63/p/zTYZMvfiNm7rILylvNOVM qfkepvR7pUc7MjQ1XYRT7L/IKB/okSXlSkfFe4y9So6IZGXLil13A= Received: (qmail 13472 invoked by alias); 29 Dec 2014 01:42:41 -0000 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 Received: (qmail 13460 invoked by uid 89); 29 Dec 2014 01:42:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: bastet.se.axis.com Received: from bastet.se.axis.com (HELO bastet.se.axis.com) (195.60.68.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Dec 2014 01:42:37 +0000 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 6919718058 for ; Mon, 29 Dec 2014 02:42:35 +0100 (CET) Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id FAw5G1eqYznq for ; Mon, 29 Dec 2014 02:42:26 +0100 (CET) Received: from boulder.se.axis.com (boulder.se.axis.com [10.0.2.104]) by bastet.se.axis.com (Postfix) with ESMTP id CEAAE1806C for ; Mon, 29 Dec 2014 02:42:26 +0100 (CET) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id B6764182F for ; Mon, 29 Dec 2014 02:42:26 +0100 (CET) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by boulder.se.axis.com (Postfix) with ESMTP id A8E3AF37 for ; Mon, 29 Dec 2014 02:42:26 +0100 (CET) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by thoth.se.axis.com (Postfix) with ESMTP id A56FF342F6; Mon, 29 Dec 2014 02:42:26 +0100 (CET) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id sBT1gQBc013996; Mon, 29 Dec 2014 02:42:26 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id sBT1gPWu013992; Mon, 29 Dec 2014 02:42:25 +0100 Date: Mon, 29 Dec 2014 02:42:25 +0100 Message-Id: <201412290142.sBT1gPWu013992@ignucius.se.axis.com> From: Hans-Peter Nilsson To: gcc-patches@gcc.gnu.org Subject: Committed: fix gcc.dg/lto/pr59626 for __USER_LABEL_PREFIX__ targets MIME-Version: 1.0 The lto/pr59626 tests, started regressing for cris-elf on trunk with a commit in the range 218651:218661. Looks like a bug was fixed, exposing a bug in the test-case; an assumption that the mapping of a function C name to assembly name does not prefix the name with any decoration. (Typically, an underscore is prepended for targets where that is false, like for cris-elf.) Other tests have the obvious solution. Copy-pasted from gcc.dg/lto/pr46940_0.c and committed as obvious. * gcc.dg/lto/pr59626_0.c (ASMNAME, ASMNAME2, STRING): Define. (__atoi): Use ASMNAME. brgds, H-P Index: gcc.dg/lto/pr59626_0.c =================================================================== --- gcc.dg/lto/pr59626_0.c (revision 219095) +++ gcc.dg/lto/pr59626_0.c (working copy) @@ -1,6 +1,10 @@ /* { dg-lto-do run } */ -int __atoi (const char *) __asm__("atoi"); +#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define ASMNAME2(prefix, cname) STRING (prefix) cname +#define STRING(x) #x + +int __atoi (const char *) __asm__(ASMNAME ("atoi")); extern inline __attribute__((always_inline,gnu_inline)) int atoi (const char *x) {