Implicit_Dereference is a type-specific aspect and therefore cannot be
legally specified as part of a subtype declaration.
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Generate
error if an aspect specification specifies the
Implicit_Dereference aspect of a non-first subtype.
Error_Msg_N
("aspect must apply to a type with discriminants", Expr);
+ elsif not Is_First_Subtype (E) then
+ Error_Msg_N
+ ("aspect not specifiable in a subtype declaration",
+ Aspect);
+
elsif not Is_Entity_Name (Expr) then
Error_Msg_N
("aspect must name a discriminant of current type", Expr);