aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2014-10-17 08:46:37 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-10-17 10:46:37 +0200
commitb98b57a59fb3130d4a9ffa275cba303fdf1b2a9f (patch)
tree71fc5fae7e2aa512ae5cd1ee83a007bc1f927dde
parentfd4647be11610a204952ce71f01a870fdfe5b6df (diff)
downloadgcc-b98b57a59fb3130d4a9ffa275cba303fdf1b2a9f.zip
gcc-b98b57a59fb3130d4a9ffa275cba303fdf1b2a9f.tar.gz
gcc-b98b57a59fb3130d4a9ffa275cba303fdf1b2a9f.tar.bz2
sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect specfications from original type declaration to declaration of...
2014-10-17 Ed Schonberg <schonberg@adacore.com> * 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. From-SVN: r216373
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/sem_ch3.adb5
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 549f7fb..c5d6122 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-17 Ed Schonberg <schonberg@adacore.com>
+
+ * 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 <kirtchev@adacore.com>
* 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 6f68580..5cf186a 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???