aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2022-03-04 17:19:18 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-13 08:04:46 +0000
commitba75fee24d91eb241b5784a8a55175c294b040ab (patch)
tree21db74f5a2c04e6cb017b574c6ed529d1404ad1e /gcc/ada/gcc-interface
parentd663778287d3bd908b5e059f640ca6a02bb0f487 (diff)
downloadgcc-ba75fee24d91eb241b5784a8a55175c294b040ab.zip
gcc-ba75fee24d91eb241b5784a8a55175c294b040ab.tar.gz
gcc-ba75fee24d91eb241b5784a8a55175c294b040ab.tar.bz2
[Ada] Storage_Model_Object fails to return object entity
After a compilation unit containing a Designated_Storage_Model aspect was processed by the compiler front end, the aspect's expression was seen as not having been analyzed. In some cases this can lead to the Storage_Model_Object function not returning the entity of the associated model object (such as when the model object is specified using an expanded name). This was due to a second copy of the aspect's expression being made in Check_Aspect_At_Freeze_Point, and that copy wasn't analyzed, even though the earlier version of the expression prior to that copy had been. (The copy is needed for proper checking of Ada's rules for ensuring that certain aspect expressions resolve the same way at the freeze point and later at the end of the declarations.) This is corrected by doing analysis of the new aspect expression within Check_Aspect_At_Freeze_Point, as is already done in that procedure in the case of several other aspects. gcc/ada/ * sem_ch13.adb (Check_Aspect_At_Freeze_Point): Analyze the expression of the aspect at this point, like other aspects that denote simple entities. Ensures that function Storage_Model_Object will have an entity to retrieve from the aspect expression. Also, move comment about aspects that don't require delay analysis in front of last alternative of the case statement, where it's supposed to be.
Diffstat (limited to 'gcc/ada/gcc-interface')
0 files changed, 0 insertions, 0 deletions