First cut at implementation of the Put_Image attribute. Work in progress. Support for Put_Image is currently disabled (see Enable_Put_Image in exp_put_image.adb).
Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-04 Bob Duff <d...@adacore.com> gcc/ada/ * libgnat/a-stobbu.adb, libgnat/a-stobbu.ads, libgnat/a-stobfi.adb, libgnat/a-stobfi.ads, libgnat/a-stoubu.adb, libgnat/a-stoubu.ads, libgnat/a-stoufi.adb, libgnat/a-stoufi.ads, libgnat/a-stoufo.adb, libgnat/a-stoufo.ads, libgnat/a-stouut.adb, libgnat/a-stouut.ads, libgnat/a-stteou.ads, libgnat/s-putaim.adb, libgnat/s-putaim.ads, libgnat/s-putima.adb, libgnat/s-putima.ads (Ada.Strings.Text_Output and children, System.Put_Images): New runtime support for Put_Image. * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add exp_put_image.o. * exp_put_image.adb, exp_put_image.ads: New compiler package that generates calls to runtime routines that implement Put_Image. * Makefile.rtl: Add object files for Ada.Strings.Text_Output and children and System.Put_Images. * aspects.adb: Simplify initialization of Canonical_Aspect. * aspects.ads: Improve documentation. Add Aspect_Put_Image. * exp_attr.adb: Add support for Put_Image, by calling routines in Exp_Put_Image. * sem_util.adb (Is_Predefined_Dispatching_Operation): Return True for new TSS_Put_Image operation. * exp_ch3.adb: For tagged types, build a dispatching TSS_Put_Image operation by calling routines in Exp_Put_Image. * exp_disp.adb, exp_disp.ads: Make TSS_Put_Image be number 10, adjusting other operations' numbers after 10. We choose 10 because that's the last number shared by all runtimes. * exp_strm.adb: Use named notation as appropriate. * exp_cg.adb, exp_tss.ads: Add TSS_Put_Image. * libgnat/a-tags.ads: Modify Max_Predef_Prims for the new TSS_Put_Image. * impunit.adb: Add new runtime packages. * rtsfind.adb, rtsfind.ads: Add support for Ada.Strings.Text_Output, Ada.Strings.Text_Output.Utils, and System.Put_Images. * sem_attr.adb: Error checking for Put_Image calls. * sem_ch12.adb (Valid_Default_Attribute): Support for passing Put_Image as a generic formal parameter. * sem_ch13.adb: Analysis of Put_Image aspect. Turn it into a Put_Image attribute definition clause. * sem_ch8.adb (Analyze_Subprogram_Renaming): Support for renaming of the Put_Image attribute. * snames.adb-tmpl: Fix comments. * snames.ads-tmpl (Name_Put_Image): New Name_Id. (Attribute_Put_Image): New Attribute_Id. * tbuild.adb, tbuild.ads (Make_Increment): New utility.
patch.diff.gz
Description: application/gzip