diff options
author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-05 01:43:31 +0000 |
---|---|---|
committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-05 01:43:31 +0000 |
commit | c8e5f2901142e22cd63a8f4557dd9eca17efb117 (patch) | |
tree | ec4cdad4a6c00dd66fd4145cb13b57eb9462931d /gcc/ada/sem_ch7.adb | |
parent | a5d181df49a871686042e2b3173903bca5094d90 (diff) | |
download | gcc-c8e5f2901142e22cd63a8f4557dd9eca17efb117.tar.gz |
* sem_ch7.adb (New_Private_Type): Set Is_Tagged_Type flag before
processing discriminants to diagnose illegal default values.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47645 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch7.adb')
-rw-r--r-- | gcc/ada/sem_ch7.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb index c1b0521b38a..74d70d1fed8 100644 --- a/gcc/ada/sem_ch7.adb +++ b/gcc/ada/sem_ch7.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.335 $ +-- $Revision$ -- -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- -- @@ -1308,6 +1308,11 @@ package body Sem_Ch7 is No (Discriminant_Specifications (N)) and then not Unknown_Discriminants_Present (N)); + -- Set tagged flag before processing discriminants, to catch + -- illegal usage. + + Set_Is_Tagged_Type (Id, Tagged_Present (Def)); + Set_Discriminant_Constraint (Id, No_Elist); Set_Girder_Constraint (Id, No_Elist); @@ -1323,7 +1328,6 @@ package body Sem_Ch7 is Set_Private_Dependents (Id, New_Elmt_List); if Tagged_Present (Def) then - Set_Is_Tagged_Type (Id, True); Set_Ekind (Id, E_Record_Type_With_Private); Make_Class_Wide_Type (Id); Set_Primitive_Operations (Id, New_Elmt_List); |