ada: Fix crash on 'Img as generic actual function
commit53d45e492ebb88a84d6440e7db089d5f78610274
authorBob Duff <duff@adacore.com>
Mon, 27 Mar 2023 22:07:17 +0000 (27 18:07 -0400)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 26 May 2023 07:29:19 +0000 (26 09:29 +0200)
tree8aab9d89ce2967d3af7a22e4fd470bcc35dfe6de
parentfa4b7069a0dfd28b58c718cf8b2060df47a39641
ada: Fix crash on 'Img as generic actual function

'Image is allowed as an actual for a generic formal function.
This patch fixes a crash when 'Img is used instead of 'Image
in that context.

Misc cleanups.

gcc/ada/

* exp_put_image.adb (Build_Image_Call): Treat 'Img the same as
'Image.
* exp_imgv.adb (Expand_Image_Attribute): If Discard_Names, expand
to 'Image instead of 'Img.
* snames.ads-tmpl, par-ch4.adb, sem_attr.adb, sem_attr.ads:
Cleanups: Rename Attribute_Class_Array to be Attribute_Set. Remove
unnecessary qualifications. DRY: Don't repeat "True".
gcc/ada/exp_imgv.adb
gcc/ada/exp_put_image.adb
gcc/ada/par-ch4.adb
gcc/ada/sem_attr.adb
gcc/ada/sem_attr.ads
gcc/ada/snames.ads-tmpl