From patchwork Fri Aug 30 14:48:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1155950 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-508044-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="kx4F+LLC"; 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 46Kj6D2CBpz9sBp for ; Sat, 31 Aug 2019 00:48:51 +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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=xqPweOMfaIOQzXwy Yanf86wX+BHxion2B2kyv8uMkBNe/Bj/0/EkMCcQbrtBe86VQB1QbuUb6eeHXVxq j1m459r1rI0kEcZipC2tMko6cEQz1b9YEW6OZp6VbvKo96Ssvcno5cZDI0lC+XKX 7e5+ND2lAVVu555yhEAKuje5K6k= 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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=YQrlczusVgtw9L0iknLdj9 U+xVA=; b=kx4F+LLCYZp5YK3AyPtqWqQb4Q06ldzXK6O6dpDDYiCTJlfpdHelrL GOZCvfMVrwVuy/84OZJAyqnbmGow6jrg8MRhmpYpmhfGC7SODzsWs79W8iupdocV S6kaWKjHZV0NTEw4eizKY0siKB/BrM9NntZGg7e8DTujpdfdkN6Tc= Received: (qmail 37271 invoked by alias); 30 Aug 2019 14:48:33 -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 37128 invoked by uid 89); 30 Aug 2019 14:48:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= 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 ESMTP; Fri, 30 Aug 2019 14:48:19 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 554E181392 for ; Fri, 30 Aug 2019 16:48:17 +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 gwSoF61qp8pW for ; Fri, 30 Aug 2019 16:48:17 +0200 (CEST) Received: from arcturus.home (unknown [IPv6:2a01:e35:8a16:3850:36e6:d7ff:fe66:317b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 339B68138F for ; Fri, 30 Aug 2019 16:48:17 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix minor inaccuracy in lvalue_required_p Date: Fri, 30 Aug 2019 16:48:27 +0200 Message-ID: <2425733.X3XQZhxnem@arcturus.home> MIME-Version: 1.0 It can only result in a missed early optimization. Tested on x86_64-suse-linux, applied on the mainline. 2019-08-30 Eric Botcazou * gcc-interface/trans.c (lvalue_required_p) : Adjust GNU_TYPE in the recursive call. : Likewise. Index: gcc-interface/trans.c =================================================================== --- gcc-interface/trans.c (revision 275187) +++ gcc-interface/trans.c (working copy) @@ -873,12 +873,14 @@ lvalue_required_p (Node_Id gnat_node, tree gnu_typ if (Prefix (gnat_parent) != gnat_node) return 0; - return lvalue_required_p (gnat_parent, gnu_type, constant, - address_of_constant); + return lvalue_required_p (gnat_parent, + get_unpadded_type (Etype (gnat_parent)), + constant, address_of_constant); case N_Selected_Component: - return lvalue_required_p (gnat_parent, gnu_type, constant, - address_of_constant); + return lvalue_required_p (gnat_parent, + get_unpadded_type (Etype (gnat_parent)), + constant, address_of_constant); case N_Object_Renaming_Declaration: /* We need to preserve addresses through a renaming. */