SPARK RM 6.9(21) forbids a ghost type to have concurrent parts.
This was not enforced, instead only the type itself was checked to
be concurrent. Now fixed.
gcc/ada/
* ghost.adb (Check_Ghost_Type): Fix checking.
Full_Typ : Entity_Id;
begin
- if Is_Ghost_Entity (Typ) then
+ if Is_Ghost_Entity (Typ)
+ and then Comes_From_Source (Typ)
+ then
Conc_Typ := Empty;
Full_Typ := Typ;
Conc_Typ := Anonymous_Object (Typ);
Full_Typ := Conc_Typ;
- elsif Is_Concurrent_Type (Typ) then
+ elsif Has_Protected (Typ)
+ or else Has_Task (Typ)
+ then
Conc_Typ := Typ;
end if;