[Ada] Check if attribute Passed_By_Reference is called on incomplete types
authorGhjuvan Lacambre <lacambre@adacore.com>
Fri, 3 Apr 2020 14:57:40 +0000 (16:57 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 16 Jun 2020 13:07:13 +0000 (09:07 -0400)
2020-06-16  Ghjuvan Lacambre  <lacambre@adacore.com>

gcc/ada/

* sem_attr.adb (Analyze_Attribute): Add
Check_Not_Incomplete_Type call.

gcc/ada/sem_attr.adb

index a7d078414589f5d84093696f334901697e62c8e4..6f9a7451e91eced4a41c048e08050ed684f9caa3 100644 (file)
@@ -5202,6 +5202,7 @@ package body Sem_Attr is
       when Attribute_Passed_By_Reference =>
          Check_E0;
          Check_Type;
+         Check_Not_Incomplete_Type;
          Set_Etype (N, Standard_Boolean);
 
       ------------------