diff options
author | Ed Schonberg <schonber@gnat.com> | 2001-12-05 19:34:44 +0000 |
---|---|---|
committer | Geert Bosch <bosch@gcc.gnu.org> | 2001-12-05 20:34:44 +0100 |
commit | 2514b8392d938188b558ec4f4716e9b1e210dcf6 (patch) | |
tree | fdbaae35b14ff4a21548c437db0437c1007905d9 /gcc/ada/sem_ch3.adb | |
parent | 82ae78227426b93541799f27f4dfcf6b62166085 (diff) | |
download | gcc-2514b8392d938188b558ec4f4716e9b1e210dcf6.zip gcc-2514b8392d938188b558ec4f4716e9b1e210dcf6.tar.gz gcc-2514b8392d938188b558ec4f4716e9b1e210dcf6.tar.bz2 |
sem_ch3.adb (Analyze_Object_Declaration): If expression is an aggregate with static wrong size...
* sem_ch3.adb (Analyze_Object_Declaration): If expression is an
aggregate with static wrong size, attach generated Raise node to
declaration.
From-SVN: r47685
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r-- | gcc/ada/sem_ch3.adb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 2b481bd..89c5ac6 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -1604,6 +1604,11 @@ package body Sem_Ch3 is if not Is_Constrained (T) then null; + elsif Nkind (E) = N_Raise_Constraint_Error then + -- Aggregate is statically illegal. Place back in declaration. + Set_Expression (N, E); + Set_No_Initialization (N, False); + elsif T = Etype (E) then null; |