https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113979
Bug ID: 113979 Summary: Allocation of 2D array fails when Dynamic Predicate applied to type Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: simon at pushface dot org CC: dkm at gcc dot gnu.org Target Milestone: --- Created attachment 57455 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57455&action=edit Reproducer This error is present in GCC 11/12/13/14 -- can’t tell about GCC 10. The error doesn’t occur without -gnata. -- $ /opt/gcc-14.0.1-20240114-x86_64/bin/gnatmake alloc2.adb -gnatwa -gnatl -f -gnata gcc -c -gnatwa -gnatl -gnata alloc2.adb GNAT 14.0.1 20240114 (experimental) Copyright 1992-2023, Free Software Foundation, Inc. Compiling: alloc2.adb Source file time stamp: 2024-02-18 14:27:29 Compiled at: 2024-02-18 14:28:05 1. procedure Alloc2 is 2. type Grid is array (Positive range <>, Positive range <>) of Integer with 3. Dynamic_Predicate => Grid'First (1) = 1 and then Grid'First (2) = 1; 4. 5. type Grid_Ptr is access Grid; 6. 7. Data : Grid_Ptr := new Grid (1 .. 10, 1 .. 20); | >>> error: invalid use of subtype mark in expression or call 8. begin -- Alloc2 9. null; 10. end Alloc2; 10 lines: 1 error gnatmake: "alloc2.adb" compilation error