]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Constraint_Error caused by 'Image applied to interface type
authorJavier Miranda <miranda@adacore.com>
Sun, 9 Jul 2023 10:58:05 +0000 (10:58 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 18 Jul 2023 13:11:48 +0000 (15:11 +0200)
commit99b45bbea4dbeb07e0fbc916be28ad006e0f83a7
tree6b2b191e0046a5261a8a6e1c77cbcf9152725418
parentc57fbb120dabb4fee85cc12ae99abe5060213d93
ada: Constraint_Error caused by 'Image applied to interface type

When the prefix of 'Image is used with a class-wide interface
type object, the frontend does not generate code to displace
the pointer to the underlying object to reference its base,
and this is required to invoke Ada.Tags.Wide_Wide_Expanded_Name.

gcc/ada/
* exp_imgv.adb (Rewrite_Object_Image): fix type of formal. Found
reading sources.
(Expand_Wide_Image_Attribute): ditto.
(Expand_Wide_Wide_Image_Attribute): ditto.
(Rewrite_Object_Image): ditto.
* exp_put_image.adb (Build_Image_Call): For class-wide interface
type prefix generate code to displace the pointer to the object to
reference the base of the underlying object.
gcc/ada/exp_imgv.adb
gcc/ada/exp_put_image.adb