public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/113979] New: Allocation of 2D array fails when Dynamic Predicate applied to type
@ 2024-02-18 14:31 simon at pushface dot org
  2024-02-19 12:17 ` [Bug ada/113979] [10/11/12/13/14 regression] bogus error on allocator for type with Dynamic_Predicate ebotcazou at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: simon at pushface dot org @ 2024-02-18 14:31 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-03-07 14:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-18 14:31 [Bug ada/113979] New: Allocation of 2D array fails when Dynamic Predicate applied to type simon at pushface dot org
2024-02-19 12:17 ` [Bug ada/113979] [10/11/12/13/14 regression] bogus error on allocator for type with Dynamic_Predicate ebotcazou at gcc dot gnu.org
2024-02-19 12:17 ` ebotcazou at gcc dot gnu.org
2024-03-04 13:09 ` [Bug ada/113979] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-03-04 13:09 ` rguenth at gcc dot gnu.org
2024-03-07 14:08 ` [Bug ada/113979] [11/12/13/14 regression] bogus error on allocator for array " cvs-commit at gcc dot gnu.org
2024-03-07 14:18 ` cvs-commit at gcc dot gnu.org
2024-03-07 14:22 ` cvs-commit at gcc dot gnu.org
2024-03-07 14:27 ` cvs-commit at gcc dot gnu.org
2024-03-07 14:28 ` ebotcazou at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).