diff options
author | Steve Baird <baird@adacore.com> | 2021-12-02 17:04:15 -0800 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-01-06 17:11:36 +0000 |
commit | c60f23e13ecbc5a5b07adb7557f1da094246cb2a (patch) | |
tree | 10d6e8ce5a0d148f989fb583ec246a3a7d7956ae /gcc/go | |
parent | 41a7b9484a39657deab7cac7092c2bf634a39365 (diff) | |
download | gcc-c60f23e13ecbc5a5b07adb7557f1da094246cb2a.zip gcc-c60f23e13ecbc5a5b07adb7557f1da094246cb2a.tar.gz gcc-c60f23e13ecbc5a5b07adb7557f1da094246cb2a.tar.bz2 |
[Ada] Avoid building malformed component constraints
gcc/ada/
* sem_util.adb (Build_Actual_Subtype_Of_Component): Define a new
local function, Build_Discriminant_Reference, and call it in
each of the three cases where Make_Selected_Component was
previously being called to construct a discriminant reference (2
in Build_Actual_Array_Constraint and 1 in
Build_Actual_Record_Constraint). Instead of unconditionally
using the passed-in object name as the prefix for the new
selected component node, this new function checks to see if
perhaps a prefix of that name should be used instead.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions