From patchwork Fri Apr 28 08:56:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 756270 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 3wDnjl2xG6z9s82 for ; Fri, 28 Apr 2017 18:56:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="F7akdJSi"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=rnwDdMptA+rk9vRSz 1cx/NOQGdhMjb4HIQLf1IRtF3zrqGW2XIB7PCwRBQatZrjWGLaRrmJ76H3254cde 3MmY1BNuKo0rND9309nHUe4nql71RjFx/6QTiI2AnJD95oTEtEId9xURYQNaJWOV /XiCuIvOmtU6ql62cgq5oK3IcE= 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 :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=XV1ZOmCvlJ7wS60Q6POBNVB ALzM=; b=F7akdJSildFPe/LwS3UyW6T+z6uD/26zdKdvhHbrPnBysxwaxzZcUpl JgOoqfk/oMpJhTOtaQH4Ecxp6xPhL9vlBsILVg/yVk403Q+MuNb4s40mVSpeE2n/ SLdq59pJd/6dREPkm5Ayk8OVfmjO4KK2OaMXndtm8DOqWJwTs5Ro= Received: (qmail 129054 invoked by alias); 28 Apr 2017 08:56:15 -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 129040 invoked by uid 89); 28 Apr 2017 08:56:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2295 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Apr 2017 08:56:13 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 609B39D420; Fri, 28 Apr 2017 08:56:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 609B39D420 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 609B39D420 Received: from tucnak.zalov.cz (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 046D18EE4A; Fri, 28 Apr 2017 08:56:13 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v3S8uAc8001631; Fri, 28 Apr 2017 10:56:11 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v3S8u8m4001630; Fri, 28 Apr 2017 10:56:08 +0200 Date: Fri, 28 Apr 2017 10:56:08 +0200 From: Jakub Jelinek To: Richard Biener Cc: David Edelsohn , David Malcolm , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix AIX bootstrap comparison due to empty *-tests.c and selftest* files (PR bootstrap/80531) Message-ID: <20170428085608.GG1809@tucnak> Reply-To: Jakub Jelinek References: <20170427202057.GE1809@tucnak> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes On Fri, Apr 28, 2017 at 07:56:23AM +0200, Richard Biener wrote: > On April 27, 2017 10:20:57 PM GMT+02:00, Jakub Jelinek wrote: > >This is something that fails bootstrap newly in GCC 7 and only with > >(now on the branch default --enable-checking=release (or > >--disable-checking)). The problem is that the *-tests.c and > >selftest*.c > >sources after including some headers have the whole body guarded with > >#if CHECKING_P > >and with release checking thus there are no global symbols. > >symtab_node::debug_symtab is a static inline method with DEBUG_FUNCTION > >and thus > >is emitted (due to __attribute__((used))) - something we should really > >fix, > >by moving its definition out of cgraph.h. > > Would that alone fix it? Or making it non-static inline? > > I suppose graphite-* may have a similar issue if you build without ISL. On the single file that has been actual problem (function-tests.c) the following does work (the GLOBAL..._random_seed) symbol is gone. But I haven't bootstrapped/regtested it on AIX nor x86_64-linux. Shall I go for this instead, or just apply it in addition to that on trunk? 2017-04-28 Jakub Jelinek * cgraph.h (symtab_node::debug_symtab): No longer inline. * symtab.c (symtab_node::debug_symtab): Move definition here. Jakub --- gcc/cgraph.h.jj 2017-04-04 07:32:50.000000000 +0200 +++ gcc/cgraph.h 2017-04-28 10:38:51.989029437 +0200 @@ -415,10 +415,7 @@ public: static void dump_table (FILE *); /* Dump symbol table to stderr. */ - static inline DEBUG_FUNCTION void debug_symtab (void) - { - dump_table (stderr); - } + static void DEBUG_FUNCTION debug_symtab (void); /* Verify symbol table for internal consistency. */ static DEBUG_FUNCTION void verify_symtab_nodes (void); --- gcc/symtab.c.jj 2017-02-03 17:09:01.000000000 +0100 +++ gcc/symtab.c 2017-04-28 10:41:04.917307155 +0200 @@ -924,6 +924,14 @@ symtab_node::dump_table (FILE *f) node->dump (f); } +/* Dump symbol table to stderr. */ + +DEBUG_FUNCTION void +symtab_node::debug_symtab (void) +{ + dump_table (stderr); +} + /* Return the cgraph node that has ASMNAME for its DECL_ASSEMBLER_NAME. Return NULL if there's no such node. */