From d4429d51ba5f1bae589a77993505c4a6aebcd00d Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Wed, 6 Aug 2008 10:32:42 +0200 Subject: [PATCH] sem_ch3.adb (Find_Type_Name): protect against duplicate incomplete declaration for the same type. 2008-08-06 Ed Schonberg * sem_ch3.adb (Find_Type_Name): protect against duplicate incomplete declaration for the same type. From-SVN: r138773 --- gcc/ada/sem_ch3.adb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 8f027957536a..ffc1be8c0425 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 -- 2.47.2