aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-05-28 23:08:32 +0200
committerMarc Poulhiès <poulhies@adacore.com>2024-06-21 10:34:19 +0200
commitaa34d34f753cee8974af6942e0603dfc2f8ea160 (patch)
tree697e194921ea100dd8ef70a4ec9e4fc3133b7b67 /libcpp
parent8c7ce88c00f9bea9fb6f7e466c8706439fb5b131 (diff)
downloadgcc-aa34d34f753cee8974af6942e0603dfc2f8ea160.zip
gcc-aa34d34f753cee8974af6942e0603dfc2f8ea160.tar.gz
gcc-aa34d34f753cee8974af6942e0603dfc2f8ea160.tar.bz2
ada: Fix internal error on case expression used as index of array component
This occurs when the bounds of the array component depend on a discriminant and the component reference is not nested, that is to say the component is not (referenced as) a subcomponent of a larger record. In this case, Analyze_Selected_Component does not build the actual subtype for the component, but it turns out to be required for constructs generated during the analysis of the case expression. The change causes this actual subtype to be built, and also renames a local variable used to hold the prefix of the selected component. gcc/ada/ * sem_ch4.adb (Analyze_Selected_Component): Rename Name into Pref and use Sel local variable consistently. (Is_Simple_Indexed_Component): New predicate. Call Is_Simple_Indexed_Component to determine whether to build an actual subtype for the component.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions