From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7469 invoked by alias); 19 May 2015 18:07:13 -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 7454 invoked by uid 89); 19 May 2015 18:07:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 19 May 2015 18:07:11 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 99F022851D74 for ; Tue, 19 May 2015 20:07:08 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y8jNvz3VIqQY for ; Tue, 19 May 2015 20:07:08 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 78AA22851634 for ; Tue, 19 May 2015 20:07:08 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Use a couple of macros in stor-layout.c Date: Tue, 19 May 2015 18:07:00 -0000 Message-ID: <15239017.UiYMmV4jq7@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart1763637.K6Ou9qSAfC" Content-Transfer-Encoding: 7Bit X-SW-Source: 2015-05/txt/msg01733.txt.bz2 --nextPart1763637.K6Ou9qSAfC Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 245 Self-explanatory, tested on x86_64-suse-linux, applied as obvious. 2015-05-19 Eric Botcazou * stor-layout.c (finalize_type_size): Use AGGREGATE_TYPE_P. (layout_type): Use RECORD_OR_UNION_TYPE_P. -- Eric Botcazou --nextPart1763637.K6Ou9qSAfC Content-Disposition: attachment; filename="p.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="p.diff" Content-length: 1305 Index: stor-layout.c =================================================================== --- stor-layout.c (revision 223349) +++ stor-layout.c (working copy) @@ -1757,12 +1757,9 @@ finalize_type_size (tree type) However, where strict alignment is not required, avoid over-aligning structures, since most compilers do not do this alignment. */ - - if (TYPE_MODE (type) != BLKmode && TYPE_MODE (type) != VOIDmode - && (STRICT_ALIGNMENT - || (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE - && TREE_CODE (type) != QUAL_UNION_TYPE - && TREE_CODE (type) != ARRAY_TYPE))) + if (TYPE_MODE (type) != BLKmode + && TYPE_MODE (type) != VOIDmode + && (STRICT_ALIGNMENT || !AGGREGATE_TYPE_P (type))) { unsigned mode_align = GET_MODE_ALIGNMENT (TYPE_MODE (type)); @@ -2431,9 +2428,7 @@ layout_type (tree type) /* Compute the final TYPE_SIZE, TYPE_ALIGN, etc. for TYPE. For records and unions, finish_record_layout already called this function. */ - if (TREE_CODE (type) != RECORD_TYPE - && TREE_CODE (type) != UNION_TYPE - && TREE_CODE (type) != QUAL_UNION_TYPE) + if (!RECORD_OR_UNION_TYPE_P (type)) finalize_type_size (type); /* We should never see alias sets on incomplete aggregates. And we --nextPart1763637.K6Ou9qSAfC--