aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.cc
diff options
context:
space:
mode:
authorPascal Obry <obry@adacore.com>2023-07-13 16:03:23 +0000
committerMarc Poulhiès <poulhies@adacore.com>2023-08-01 10:06:45 +0200
commit46640bafbbe69fbd6960b21ed5a8ed635f99afa5 (patch)
tree47773d94611edde7cf39f30037ece421485878c5 /gcc/tree-cfg.cc
parentf9b03ef769578fe9388c32b9364f21d0dc1fb6fa (diff)
downloadgcc-46640bafbbe69fbd6960b21ed5a8ed635f99afa5.zip
gcc-46640bafbbe69fbd6960b21ed5a8ed635f99afa5.tar.gz
gcc-46640bafbbe69fbd6960b21ed5a8ed635f99afa5.tar.bz2
ada: Default Put_Image for composite derived types is missing information
The output generated by a call to Some_Derived_Composite_Type'Put_Image (in Ada2022 code) is incomplete in some cases, notably for a type derived from a container type (i.e., from the Set/Map/List/Vector type declared in an instance of one of Ada's predefined container generics) with no user-specified Put_Image procedure. gcc/ada/ * aspects.ads (Find_Aspect): Add Boolean parameter Or_Rep_Item (defaulted to False). * aspects.adb (Find_Aspect): If new Boolean parameter Or_Rep_Item is True, then instead of returning an empty result if no appropriate N_Aspect_Specification node is found, return an appropriate N_Attribute_Definition_Clause if one is found. * exp_put_image.ads: Change name of Enable_Put_Image function to Put_Image_Enabled. * exp_put_image.adb (Build_Record_Put_Image_Procedure): Detect the case where a call to the Put_Image procedure of a derived type can be transformed into a call to the parent type's Put_Image procedure (with a type conversion to the parent type as the actual parameter). (Put_Image_Enabled): Change name of function (previously Enable_Put_Image). Return True in more cases. In particular, return True for a type with an explicitly specified Put_Image aspect even if the type is declared in a predefined unit (or in an instance of a predefined generic unit). * exp_attr.adb: Changes due to Put_Image_Enabled function name change.
Diffstat (limited to 'gcc/tree-cfg.cc')
0 files changed, 0 insertions, 0 deletions