From 6e25b12c73ca6b7a8febaec81b7dc98066b4715c Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 17 Oct 2014 08:46:37 +0000 Subject: [PATCH] 2014-10-17 Ed Schonberg * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect specfications from original type declaration to declaration of implicit base, because original node is rewritten as a subtype declaration on which type aspects do not belong. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216373 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 7 +++++++ gcc/ada/sem_ch3.adb | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 549f7fbff13..c5d6122afd2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2014-10-17 Ed Schonberg + + * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect + specfications from original type declaration to declaration of + implicit base, because original node is rewritten as a subtype + declaration on which type aspects do not belong. + 2014-10-17 Hristian Kirtchev * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 6f685808157..5cf186a66e1 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -6364,6 +6364,11 @@ package body Sem_Ch3 is Analyze (N); + -- Propagate the aspects from the original type declaration to the + -- declaration of the implicit base. + + Move_Aspects (From => Original_Node (N), To => Type_Decl); + -- Apply a range check. Since this range expression doesn't have an -- Etype, we have to specifically pass the Source_Typ parameter. Is -- this right??? -- 2.11.4.GIT