From patchwork Tue Sep 17 08:06:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 1163234 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-509097-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="yznjl38F"; 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 46XbSv1wpjz9sNx for ; Tue, 17 Sep 2019 18:12:47 +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:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=NbL1iV4nhBE8ZWOZ98m9lvHGxeChqq9ixf8623DtuTlVV3TFc7 rLlSCHiyCSC9hJ5YriMrIRmcZd+uGsMrgL0P7XDNqJ1lqZDN6etz1HBA8S92wHX/ LIVuiuVwOeOWT8O7/1DVPHX3j92rjOos6f8tW4zTMKHPUYeDtmG3aYdng= 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:mime-version:content-type; s= default; bh=iK1FUfNAW8nHlMdrQmPUvr34YQ0=; b=yznjl38Fulndi708XN5g 9whSFSH1KJfWkzT7HvJUlYI7B26CfxtbXkb2X5AZsUkCNM1FPqiltmS5reT8ftOn L24cXRYsNcXeYdXaRssQ3hGKOe8/5Gg1SdUab6zUbKjMVd2pCEwparmssNRkAUym u6eYIWjf09dfIQ2mt0Ncicc= Received: (qmail 33535 invoked by alias); 17 Sep 2019 08:07:07 -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 31837 invoked by uid 89); 17 Sep 2019 08:06:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_NEUTRAL autolearn=ham version=3.3.1 spammy=propagate X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Sep 2019 08:06:52 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iA8VZ-0003ZO-0M for gcc-patches@gcc.gnu.org; Tue, 17 Sep 2019 04:06:46 -0400 Received: from rock.gnat.com ([2620:20:4000:0:a9e:1ff:fe9b:1d1]:58149) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iA8VU-0003Vl-PU for gcc-patches@gcc.gnu.org; Tue, 17 Sep 2019 04:06:41 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 568C9117BD9; Tue, 17 Sep 2019 04:06:33 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iYvpE8J5j1uu; Tue, 17 Sep 2019 04:06:33 -0400 (EDT) Received: from tron.gnat.com (tron.gnat.com [205.232.38.10]) by rock.gnat.com (Postfix) with ESMTP id 43BF1117BD6; Tue, 17 Sep 2019 04:06:33 -0400 (EDT) Received: by tron.gnat.com (Postfix, from userid 4862) id 42A5D6AD; Tue, 17 Sep 2019 04:06:33 -0400 (EDT) Date: Tue, 17 Sep 2019 04:06:33 -0400 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Javier Miranda Subject: [Ada] Missing tagged type decoration in corresponding record subtypes Message-ID: <20190917080633.GA37452@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2620:20:4000:0:a9e:1ff:fe9b:1d1 X-IsSubscribed: yes The frontend silently skips propagating attribute Is_Tagged_Type to the constrained corresponding record subtype associated with a protected type or task type with discriminants. This change does not affect the functionality of the compiler; it leaves more clean the decoration of internal entities. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-09-17 Javier Miranda gcc/ada/ * sem_ch3.adb (Constrain_Corresponding_Record): Propagate attribute Is_Tagged_Type. --- gcc/ada/sem_ch3.adb +++ gcc/ada/sem_ch3.adb @@ -13750,6 +13750,7 @@ package body Sem_Ch3 is begin Set_Etype (T_Sub, Corr_Rec); Set_Has_Discriminants (T_Sub, Has_Discriminants (Prot_Subt)); + Set_Is_Tagged_Type (T_Sub, Is_Tagged_Type (Corr_Rec)); Set_Is_Constrained (T_Sub, True); Set_First_Entity (T_Sub, First_Entity (Corr_Rec)); Set_Last_Entity (T_Sub, Last_Entity (Corr_Rec));