aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2025-03-17 18:30:00 +0000
committerEric Botcazou <ebotcazou@adacore.com>2025-06-09 10:24:22 +0200
commitd96603a48d338a92b78628016d00cbf11576621e (patch)
treeaa75c07fe07b4af46d2c585b0529e9f2023b2270 /gcc/tree-if-conv.c
parent6cc5c01aa77a1f01057a963cc5061bad4b0cc270 (diff)
downloadgcc-d96603a48d338a92b78628016d00cbf11576621e.zip
gcc-d96603a48d338a92b78628016d00cbf11576621e.tar.gz
gcc-d96603a48d338a92b78628016d00cbf11576621e.tar.bz2
ada: Support fixed-lower-bound array types as generic actual parameters
Attempting to use a fixed-lower-bound array type (or subtype) as an actual parameter for a formal unconstrained array type was being rejected by the compiler (complaining about the index type of the actual not matching the index type of the formal type). The compiler was improperly testing the actual's FLB range and finding that it didn't statically match the index type of the formal array type; it should instead test the underlying index type of the FLB type or subtype. gcc/ada/ChangeLog: * sem_ch3.adb (Constrain_Index): In the case of a fixed-lower-bound index, set Etype of the newly created itype's Scalar_Range from the index's Etype. * sem_ch12.adb (Validate_Array_Type_Instance): If the actual subtype is a fixed-lower-bound type, then check again the Etype of its Scalar_Range.
Diffstat (limited to 'gcc/tree-if-conv.c')
0 files changed, 0 insertions, 0 deletions