Skip to content
Snippets Groups Projects
Commit 3e2b3dd7 authored by Javier Miranda's avatar Javier Miranda Committed by Marc Poulhiès
Browse files

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.
parent b9be798a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment