From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129421 invoked by alias); 8 Sep 2017 08:38:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 128794 invoked by uid 89); 8 Sep 2017 08:38:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-18.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Sep 2017 08:38:22 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 2E5D2D62; Fri, 8 Sep 2017 10:38:20 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id la5wGw4M+tsK; Fri, 8 Sep 2017 10:38:17 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 17A62D60; Fri, 8 Sep 2017 10:38:17 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id v888cFsp000519; Fri, 8 Sep 2017 10:38:15 +0200 (MEST) From: Rainer Orth To: David Edelsohn Cc: Jakub Jelinek , wishwu007 , =?utf-8?B?5ZC05r2N5rWgKOatpOW9vCk=?= , Dmitry Vyukov , Jeffrey Law , GCC Patches , Eric Botcazou Subject: Re: Add support to trace comparison instructions and switch statements References: <20170906212417.GR2323@tucnak> Date: Fri, 08 Sep 2017 08:38:00 -0000 In-Reply-To: (David Edelsohn's message of "Thu, 7 Sep 2017 22:17:19 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00462.txt.bz2 --=-=-= Content-Type: text/plain Content-length: 2242 Hi David, > On Thu, Sep 7, 2017 at 6:57 PM, Rainer Orth wrote: >> Jakub Jelinek writes: >> >>> On Wed, Sep 06, 2017 at 10:08:01PM +0200, David Edelsohn wrote: >>>> This change broke bootstrap on AIX because sancov.c now references a >>>> macro that is defined as a function on AIX. sancov.c needs to include >>>> tm_p.h to pull in the target-dependent prototypes. The following >>>> patch works for me. Is this okay? >>>> >>>> * sancov.c: Include tm_p.h. >>> >>> Ok, thanks. And sorry for the breakage. >>> >>>> Index: sancov.c >>>> =================================================================== >>>> --- sancov.c (revision 251817) >>>> +++ sancov.c (working copy) >>>> @@ -28,6 +28,7 @@ >>>> #include "basic-block.h" >>>> #include "options.h" >>>> #include "flags.h" >>>> +#include "tm_p.h" >>>> #include "stmt.h" >>>> #include "gimple-iterator.h" >>>> #include "gimple-builder.h" >> >> This broke SPARC bootstrap, however: >> >> In file included from ./tm_p.h:4:0, >> from /vol/gcc/src/hg/trunk/local/gcc/sancov.c:31: >> /vol/gcc/src/hg/trunk/local/gcc/config/sparc/sparc-protos.h:46:47: error: use of enum 'memmodel' without previous declaration >> extern void sparc_emit_membar_for_model (enum memmodel, int, int); >> ^ >> >> This fix allows the bootstrap to continue, but I'm not certain how >> header inclusion is supposed to be done this way: > > It looks like sancov.c also needs to include memmodel.h before tm_p.h. > One should not include memmodel.h in sparc-protos.h. You're right, of course: I'd mostly forgotten about the include flattening. I've now installed the patch below as obvious after successful sparc-sun-solaris2.11 and i386-pc-solaris2.11 bootstraps. However, this seems extremely fragile to me: neither Jakub nor yourself remembered about this requirement and it affects only a few platforms. Feels like an incomplete transition... Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2017-09-08 Rainer Orth * sancov.c: Include memmodel.h. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sancov.patch Content-length: 507 changeset: 40433:6390d6278d19 tag: tip user: Rainer Orth date: Fri Sep 08 10:34:07 2017 +0200 summary: Fix SPARC bootstrap: sancov.c needs memmodel.h diff --git a/gcc/sancov.c b/gcc/sancov.c --- a/gcc/sancov.c +++ b/gcc/sancov.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. #include "basic-block.h" #include "options.h" #include "flags.h" +#include "memmodel.h" #include "tm_p.h" #include "stmt.h" #include "gimple-iterator.h" --=-=-=--