[Ada] Attribute Img on derived types
authorEd Schonberg <schonberg@adacore.com>
Mon, 29 Jun 2020 21:06:42 +0000 (17:06 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 16 Oct 2020 07:33:21 +0000 (03:33 -0400)
commit5742eed7a6e567c3fc28adea17d0788ea4be136f
tree8682c7f1cec3086e6b97ec3dc1c88ef6b0ab2625
parentd22f3eabf11d403a4885b986b33006d21dc431ba
[Ada] Attribute Img on derived types

gcc/ada/

* exp_imgv.adb (Expand_Image_Attribute): Use the base type
instead of the root type when type of object is private. Remove
Ada_2020 guard, because it has been checked during prior
analysis. Use Underlying_Type in all cases, as it is a no-op on
types that are not private.
gcc/ada/exp_imgv.adb