diff options
author | Ed Schonberg <schonberg@adacore.com> | 2008-08-06 10:32:42 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-08-06 10:32:42 +0200 |
commit | d4429d51ba5f1bae589a77993505c4a6aebcd00d (patch) | |
tree | 9323d0a79463facfe9751fa608cc1fc881689cb6 /gcc | |
parent | dbe0163146c0c078d39d586bc3ff14a767904c2d (diff) | |
download | gcc-d4429d51ba5f1bae589a77993505c4a6aebcd00d.zip gcc-d4429d51ba5f1bae589a77993505c4a6aebcd00d.tar.gz gcc-d4429d51ba5f1bae589a77993505c4a6aebcd00d.tar.bz2 |
sem_ch3.adb (Find_Type_Name): protect against duplicate incomplete declaration for the same type.
2008-08-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Find_Type_Name): protect against duplicate incomplete
declaration for the same type.
From-SVN: r138773
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch3.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 8f02795..ffc1be8 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -13210,6 +13210,13 @@ package body Sem_Ch3 is Set_Scope (Id, Current_Scope); New_Id := Id; + -- If this is a repeated incomplete declaration, no further + -- checks are possible. + + if Nkind (N) = N_Incomplete_Type_Declaration then + return Prev; + end if; + -- Case of full declaration of incomplete type elsif Ekind (Prev) = E_Incomplete_Type then |