aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2023-01-08 18:22:17 -0500
committerMarc Poulhiès <poulhies@adacore.com>2023-05-15 11:36:42 +0200
commitd2a1dcf72f793d671512bd5638d5b66eb19e8ca6 (patch)
tree5ab875c75a755fefd8cc712048ccb8f91d2ba549 /libgcc
parent0ca7fcf5635bdd363a5a18e7cf5828d87b5aac55 (diff)
downloadgcc-d2a1dcf72f793d671512bd5638d5b66eb19e8ca6.zip
gcc-d2a1dcf72f793d671512bd5638d5b66eb19e8ca6.tar.gz
gcc-d2a1dcf72f793d671512bd5638d5b66eb19e8ca6.tar.bz2
ada: Clean up vanishing entity fields
Fix all the failures caused by enabling Check_Vanishing_Fields on entities in all cases except the case of converting to or from E_Void. But leave Check_Vanishing_Fields disabled by default (controlled by -gnatd_v flag), because it might be too slow even for assertions-on mode, and we should deal with the E_Void cases eventually. The failures are fixed either by adding calls to Reinit_Field_To_Zero, or by changing which entities have which fields. Note that in a series of Reinit_Field_To_Zero calls, the optional Old_Ekind parameter is only useful on the first such call. gcc/ada/ * atree.adb (Check_Vanishing_Fields): Disable the check for "root/base type only" fields. This is a bug fix -- if we're checking some subtype S, we don't want to reach over to the root or base type and Reinit_Field_To_Zero of that, thus modifying the field for lots of subtypes other than S. Disable in the to/from E_Void cases. Misc cleanup. * gen_il-gen-gen_entities.adb: Define First_Entity, Last_Entity, and Stored_Constraint for all type entities, because there are too many cases where Reinit_Field_To_Zero would otherwise be needed. In any case, it seems cleaner to have First_Entity and Last_Entity defined in the same entity kinds. * einfo.ads: (First_Entity, Last_Entity, Stored_Constraint): Update comments to reflect gen_il-gen-gen_entities.adb changes. (Lit_Hash): Add missing "[root type only]" comment. * exp_ch5.adb: Add Reinit_Field_To_Zero calls for vanishing fields. * sem_ch10.adb: Likewise. * sem_ch6.adb: Likewise. * sem_ch7.adb: Likewise. * sem_ch8.adb: Likewise. * sem_ch3.adb: Likewise. Also remove now-unnecessary Reinit_Field_To_Zero calls.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions