ada: Spurious error on the default value of a derived scalar type
When the aspect Default_Value is inherited by a derived scalar
type, and both the parent type T and the derived type DT are
declared in the same scope, a spurious error may be reported.
This occurs if a subprogram declared in the same scope has a
parameter of type DT with a default value, leading the compiler
to incorrectly flag the default value specified in the aspect
of type T as having the wrong type.
gcc/ada/
* freeze.adb (Freeze_Entity): For scalar derived types that
inherit the aspect Default_Value, do not analyze and resolve the
inherited aspect, as the type of the aspect remains the parent
type.