From patchwork Fri Oct 31 11:09:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 405276 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 EAA5914007D for ; Fri, 31 Oct 2014 22:10:00 +1100 (AEDT) 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=Ot51SlmGgJU0l2NHUCpPHBxuKkd9D0EQ3gGyxn+HNub+HbdShL Svka4Y+pHxuauvO+YaiCBWgEis5e52mOx5Gt7T8TCi9Q+1ncUV2R8qCOmpgPDSzL ObnGmtgAANRj8GIJOZtmL+kUl6LdDS9zwdhK7BuNlzeX5LQU7sg3h0ti4= 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=jB3XdZ41DuJUtboZ3KtGNwYEo+0=; b=dN6u1hp2W9dIhGnikm0t Yprl72J0u/5G5nWvTcyRU0Gic75tFwEldZDc8PCHQ6FDJGSZw1/AiZ28ZXB7T2X0 iAnQSsIVwE45S6ZyP0RNIgvEdIxLm8m+J7eItLv4SduVmFBKkfmHjJx4NTes95ea inuU9VekZQ4/BATHuW0XDGY= Received: (qmail 11815 invoked by alias); 31 Oct 2014 11:09:53 -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 11805 invoked by uid 89); 31 Oct 2014 11:09:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 31 Oct 2014 11:09:48 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A4A86116229; Fri, 31 Oct 2014 07:09:46 -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 0VTeQc9LcuVP; Fri, 31 Oct 2014 07:09:46 -0400 (EDT) Received: from kwai.gnat.com (unknown [IPv6:2620:20:4000:0:7a2b:cbff:fe60:cb11]) by rock.gnat.com (Postfix) with ESMTP id 95231116220; Fri, 31 Oct 2014 07:09:46 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id 93B233FE21; Fri, 31 Oct 2014 07:09:46 -0400 (EDT) Date: Fri, 31 Oct 2014 07:09:46 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Ed Schonberg Subject: [Ada] Aspect Default_Storage_Pool Message-ID: <20141031110946.GA23907@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) This aspect was not properly recognized by GNAT, even though the corresponding pragma was fully handled. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-31 Ed Schonberg * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool. * sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect Default_Storage_Pool. Index: aspects.adb =================================================================== --- aspects.adb (revision 216925) +++ aspects.adb (working copy) @@ -511,6 +511,7 @@ Aspect_Default_Component_Value => Aspect_Default_Component_Value, Aspect_Default_Initial_Condition => Aspect_Default_Initial_Condition, Aspect_Default_Iterator => Aspect_Default_Iterator, + Aspect_Default_Storage_Pool => Aspect_Default_Storage_Pool, Aspect_Default_Value => Aspect_Default_Value, Aspect_Depends => Aspect_Depends, Aspect_Dimension => Aspect_Dimension, Index: aspects.ads =================================================================== --- aspects.ads (revision 216925) +++ aspects.ads (working copy) @@ -88,6 +88,7 @@ Aspect_Default_Component_Value, Aspect_Default_Initial_Condition, -- GNAT Aspect_Default_Iterator, + Aspect_Default_Storage_Pool, Aspect_Default_Value, Aspect_Depends, -- GNAT Aspect_Dimension, -- GNAT @@ -314,6 +315,7 @@ Aspect_Default_Component_Value => Expression, Aspect_Default_Initial_Condition => Optional_Expression, Aspect_Default_Iterator => Name, + Aspect_Default_Storage_Pool => Expression, Aspect_Default_Value => Expression, Aspect_Depends => Expression, Aspect_Dimension => Expression, @@ -401,6 +403,7 @@ Aspect_Default_Component_Value => Name_Default_Component_Value, Aspect_Default_Initial_Condition => Name_Default_Initial_Condition, Aspect_Default_Iterator => Name_Default_Iterator, + Aspect_Default_Storage_Pool => Name_Default_Storage_Pool, Aspect_Default_Value => Name_Default_Value, Aspect_Depends => Name_Depends, Aspect_Dimension => Name_Dimension, @@ -616,6 +619,7 @@ Aspect_Constant_Indexing => Always_Delay, Aspect_CPU => Always_Delay, Aspect_Default_Iterator => Always_Delay, + Aspect_Default_Storage_Pool => Always_Delay, Aspect_Default_Value => Always_Delay, Aspect_Default_Component_Value => Always_Delay, Aspect_Discard_Names => Always_Delay, Index: sem_ch13.adb =================================================================== --- sem_ch13.adb (revision 216925) +++ sem_ch13.adb (working copy) @@ -2236,6 +2236,20 @@ Insert_Pragma (Aitem); goto Continue; + -- Default_Storage_Pool + + when Aspect_Default_Storage_Pool => + Make_Aitem_Pragma + (Pragma_Argument_Associations => New_List ( + Make_Pragma_Argument_Association (Loc, + Expression => Relocate_Node (Expr))), + Pragma_Name => + Name_Default_Storage_Pool); + + Decorate (Aspect, Aitem); + Insert_Pragma (Aitem); + goto Continue; + -- Depends -- Aspect Depends is never delayed because it is equivalent to @@ -8693,6 +8707,9 @@ when Aspect_Default_Component_Value => T := Component_Type (Entity (ASN)); + when Aspect_Default_Storage_Pool => + T := Class_Wide_Type (RTE (RE_Root_Storage_Pool)); + -- Default_Value is resolved with the type entity in question when Aspect_Default_Value =>