From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D267E3856089; Sun, 18 Feb 2024 14:31:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D267E3856089 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708266673; bh=olG9N2FdB0tLczDtlQb3L4Evk9Lxd/q129UhuOqAKUE=; h=From:To:Subject:Date:From; b=g1LKPp767ng7pNrkm1iG+6KWGjuZ3hF514Sq56c4POc9yYPvaaCLK+ueORbCYUYG/ ryS+ZojBDVlmWhNy5MLH7mEo8zONz25FxjJSKW67hewCQkApVDY0ySMT7M+9oihKzI 2+INFwgF7fQP1oVnNapq2PD3+e4TL0Xs/St95T+Y= From: "simon at pushface dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/113979] New: Allocation of 2D array fails when Dynamic Predicate applied to type Date: Sun, 18 Feb 2024 14:31:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simon at pushface dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113979 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=3D57455&action=3Dedit Reproducer This error is present in GCC 11/12/13/14 -- can=E2=80=99t tell about GCC 10. The error doesn=E2=80=99t 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 Int= eger with 3. Dynamic_Predicate =3D> Grid'First (1) =3D 1 and then Grid'Fir= st (2) =3D 1; 4. 5. type Grid_Ptr is access Grid; 6. 7. Data : Grid_Ptr :=3D 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=