From patchwork Tue Jul 25 16:06:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Wilson X-Patchwork-Id: 793529 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-458945-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="KWPTX9Z8"; dkim-atps=neutral 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 3xH3771C8yz9s2s for ; Wed, 26 Jul 2017 02:07:20 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=aI++LQMFCJyBhcPBH 9n7rVzAuMVyh1rS5gY4WcuAyToosl5NaIL6dzwSkE3hkBxv/j2IML0HILaDNi9In huvUZMqsFLgiYjjsJtdgQ+o1YaCcK3lMtLdfPWh1T8Xxusn1k/BGh56bYyXqZyNw Awj2avSr2bpqcSW4It9W3irN4k= 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 :subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=tGosAyU/NVfZkH7FhG++M+c z5f4=; b=KWPTX9Z8zyW5o4bpXQ8NhrW9H22Wp/q6xKljzPXCZyxXEe+gInd3zBK F5aLyd2jRD6QRt/Bfn8C+DvVyadxdrr9xZuKrzeN/GRZ6K5dgUs72wzYWGZaMyz1 HL77akbASAFfS7qlRrHY2/2DGf9ticMLXHCiX/50OmzwlXQEpa8Q= Received: (qmail 1479 invoked by alias); 25 Jul 2017 16:07:06 -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 1255 invoked by uid 89); 25 Jul 2017 16:07:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f42.google.com Received: from mail-oi0-f42.google.com (HELO mail-oi0-f42.google.com) (209.85.218.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Jul 2017 16:07:02 +0000 Received: by mail-oi0-f42.google.com with SMTP id e124so96546466oig.2 for ; Tue, 25 Jul 2017 09:07:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=ofzCJs5yKWqtUpqscWARIn/OLZoc7jCKY+/wBY7pOkE=; b=Xlh2B+L3H4kQ1zP54CETXN4JQJzjWs4Zi+GOXvUWaRN1Iw8yvlkjOKgb9JknpatY96 rlloUHTFcd6QWjG7Gvo8Io2seDz4K6TNPD116jMco3VVKQoE4KMxmkHNpigtrdvnQLVo sPs88nAu8XXvcARZ3/RHFXWmnVklk85TodBeOYwhv9Klj1Uy8YSRCNm+VHHD/MsAPh6C nI1lBUAy6WX5kXnDobwoOqrDB0B8GkF9JzgRNRfQvIy2144dcpiljv/40jqDAprlzymt arg9Kojepk0IOqasKBNZq+PmJ49lY8guHAE/GJzJJGw65pzoS72D5YAT57qy9ldb43A7 ufpg== X-Gm-Message-State: AIVw1110kwlUTEPxtwJbeETKo3MOAu4+e78MOazHKScCoPnWLVYuSVKl zAP1GktRxLoZ5un2 X-Received: by 10.202.216.132 with SMTP id p126mr9753344oig.262.1500998820475; Tue, 25 Jul 2017 09:07:00 -0700 (PDT) Received: from ?IPv6:2602:306:80a3:c890:9d31:5f4f:4f6:c998? ([2602:306:80a3:c890:9d31:5f4f:4f6:c998]) by smtp.googlemail.com with ESMTPSA id g3sm11950384oif.21.2017.07.25.09.06.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jul 2017 09:06:59 -0700 (PDT) Subject: Re: [PATCH] Kill TYPE_METHODS 0/9 To: Jakub Jelinek , Nathan Sidwell Cc: GCC Patches , Jason Merrill , Richard Guenther , Jim Wilson , Jan Hubicka References: <8377f2cd-577c-60b2-63ac-f2619ebe63aa@acm.org> <20170724092514.GN2123@tucnak> From: Jim Wilson Message-ID: <448f71ec-7b97-a1a6-fd9f-4dde7c75f4d9@linaro.org> Date: Tue, 25 Jul 2017 09:06:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170724092514.GN2123@tucnak> On 07/24/2017 02:25 AM, Jakub Jelinek wrote: > Seems TYPE_METHODS have been left in a couple of spots. For winnt-cxx.c > it apparently causes bootstrap failure (I have no way to test it for that > target, but given that the bootstrap is certainly broken right now, it > can't make things worse) and documentation has not been updated. There were two uses of TYPE_METHODS in winnt-cxx.c, and Jakub's patch fixed only one of them. I wrote a patch to fix the other, fixed the exact same way as Jakub's earlier patch, with a few indentation and white space fixes also. This was tested with a cross build, and checked in under the obvious rule. Jim 2017-07-25 Jim Wilson gcc/ PR bootstrap/81521 * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS. Index: gcc/config/i386/winnt-cxx.c =================================================================== --- gcc/config/i386/winnt-cxx.c (revision 250526) +++ gcc/config/i386/winnt-cxx.c (working copy) @@ -127,7 +127,8 @@ i386_pe_adjust_class_at_definition (tree t) for (thunk = DECL_THUNKS (member); thunk; thunk = TREE_CHAIN (thunk)) maybe_add_dllexport (thunk); - } + } + /* Check vtables */ for (member = CLASSTYPE_VTABLES (t); member; member = DECL_CHAIN (member)) @@ -145,14 +146,11 @@ i386_pe_adjust_class_at_definition (tree t) That is just right since out-of class declarations can only be a definition. */ - /* Check static VAR_DECL's. */ + /* Check FUNCTION_DECL's and static VAR_DECL's. */ for (member = TYPE_FIELDS (t); member; member = DECL_CHAIN (member)) if (TREE_CODE (member) == VAR_DECL) maybe_add_dllimport (member); - - /* Check FUNCTION_DECL's. */ - for (member = TYPE_METHODS (t); member; member = DECL_CHAIN (member)) - if (TREE_CODE (member) == FUNCTION_DECL) + else if (TREE_CODE (member) == FUNCTION_DECL) { tree thunk; maybe_add_dllimport (member); @@ -161,10 +159,11 @@ i386_pe_adjust_class_at_definition (tree t) for (thunk = DECL_THUNKS (member); thunk; thunk = DECL_CHAIN (thunk)) maybe_add_dllimport (thunk); - } + } /* Check vtables */ - for (member = CLASSTYPE_VTABLES (t); member; member = DECL_CHAIN (member)) + for (member = CLASSTYPE_VTABLES (t); + member; member = DECL_CHAIN (member)) if (TREE_CODE (member) == VAR_DECL) maybe_add_dllimport (member);