diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-12-12 23:08:30 +0100 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-01-06 10:14:49 +0100 |
commit | 0d736433f9261fb9705f860a2e41cc407ecd972c (patch) | |
tree | bd9fcab966bf318c777fabb0bb0b593637cc4b6d /gcc/fortran/trans-expr.cc | |
parent | 06bc21f49d9a11b2b53108c95d9c991e51f3a785 (diff) | |
download | gcc-0d736433f9261fb9705f860a2e41cc407ecd972c.zip gcc-0d736433f9261fb9705f860a2e41cc407ecd972c.tar.gz gcc-0d736433f9261fb9705f860a2e41cc407ecd972c.tar.bz2 |
ada: Fix predicate involving array indexing rejected in generic package
The indexing is rejected with the message:
error: reference to current instance of type does not denote a type
when it is applied to a prefix which is the current instance of the type
to which the predicate is applied.
There is already a specific handling of component selection for this case
present in Find_Selected_Component, so this adds an equivalent specific
handling of indexing for this case to Analyze_Indexed_Component_Form.
gcc/ada/ChangeLog:
PR ada/117569
* sem_ch4.adb (Analyze_Indexed_Component_Form): Do not rewrite the
node as a type conversion if it is the current instance of a type
in a generic unit.
* sem_ch8.adb (Find_Selected_Component): Restrict the special case
of the current instance of a type to a generic unit.
Diffstat (limited to 'gcc/fortran/trans-expr.cc')
0 files changed, 0 insertions, 0 deletions