public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/115150] New: [12/13/14/15 Regression] SHAPE of zero-sized array yields a negative value
@ 2024-05-18 16:12 burnus at gcc dot gnu.org
  2024-05-18 16:36 ` [Bug fortran/115150] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2024-05-18 16:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115150

            Bug ID: 115150
           Summary: [12/13/14/15 Regression] SHAPE of zero-sized array
                    yields a negative value
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

GCC 11.4 has:
 Shape:           0           0
 Shape:           0           3           0

But since GCC 12:
 Shape:          -2           0
 Shape:          -3           3           0

Testcase:

implicit none
real,allocatable :: A(:),B(:,:)
allocate(a(3:0), b(5:1, 3))
print *, 'Shape:', shape(a), size(a)
print *, 'Shape:', shape(b), size(b)
end

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

end of thread, other threads:[~2024-05-28 16:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-18 16:12 [Bug fortran/115150] New: [12/13/14/15 Regression] SHAPE of zero-sized array yields a negative value burnus at gcc dot gnu.org
2024-05-18 16:36 ` [Bug fortran/115150] " burnus at gcc dot gnu.org
2024-05-20  6:35 ` cvs-commit at gcc dot gnu.org
2024-05-21 15:22 ` [Bug fortran/115150] [12/13/14 " pault at gcc dot gnu.org
2024-05-28 13:00 ` cvs-commit at gcc dot gnu.org
2024-05-28 14:57 ` cvs-commit at gcc dot gnu.org
2024-05-28 16:51 ` cvs-commit at gcc dot gnu.org
2024-05-28 16:52 ` burnus 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).