[Bug ada/18205] Legal program rejected, RM 13.13.2(14)
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 2 22:24:59 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18205
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:b0fdf6f560bd7ad8fea92458e7dfa577bae41c11
commit r16-9041-gb0fdf6f560bd7ad8fea92458e7dfa577bae41c11
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Apr 14 20:52:00 2026 +0200
ada: Fix missing dispatching for default implementation of
S'Class'{Read,Write}
Note that 'Output and 'Put_Image are also affected since they share a
common
implementation with the others.
gcc/ada/ChangeLog:
PR ada/18205
* exp_attr.adb (Rewrite_Attribute_Proc_Call): Skip the conversion
to
the formal type only if the actual is of a class-wide type.
Generate
a dispatching call when both the prefix is a class-wide type and
the
subprogram is a dispatching operation.
(Expand_N_Attribute_Reference) <Input>: Use U_Type consistently and
remove an useless invocation of Root_Type.
<Put_Image>: Minor comment tweak.
<Read>: Likewise.
<Write>: Likewise.
More information about the Gcc-bugs
mailing list