[Bug ada/95664] generic instantiation fails to detect abstract equality, builds with gcc-9 and fails to link with gcc-10
ludovic@ludovic-brenta.org
gcc-bugzilla@gcc.gnu.org
Sat Jun 13 16:01:33 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95664
Ludovic Brenta <ludovic@ludovic-brenta.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ludovic@ludovic-brenta.org
--- Comment #1 from Ludovic Brenta <ludovic@ludovic-brenta.org> ---
ARM 3.9.3(3/2): A subprogram declared by an abstract_subprogram_declaration
or a formal_abstract_subprogram_declaration is an abstract subprogram.
If it is a primitive subprogram of a tagged type, then the tagged type
shall be abstract.
so this does not explicitly forbid abstract subprograms that are primitive
to an untagged type; however:
7
A call on an abstract subprogram shall be a dispatching call;
nondispatching calls to an abstract subprogram are not allowed.
this implicitly requires the formal type of the controlling operand to be
tagged and the actual to be class-wide.
Therefore I think gcc-9.3 and gcc-10.1 should both report an error; it should
be illegal to declare "=" as an abstract primitive subprogram of the untagged
type Element.
More information about the Gcc-bugs
mailing list