diff options
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r-- | gcc/ada/sem_ch4.adb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 81c4e2ab22e..1e363590e02 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -338,7 +338,8 @@ package body Sem_Ch4 is Check_Restriction (No_Protected_Type_Allocators, N); end if; - if Is_Limited_Type (Type_Id) + if Nkind (Expression (E)) /= N_Aggregate + and then Is_Limited_Type (Type_Id) and then Comes_From_Source (N) and then not In_Instance_Body then |