public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/105759] New: is_contiguous(zero_size_array(2:0)) wrongly returns .true.
@ 2022-05-28 15:48 burnus at gcc dot gnu.org
  2022-05-28 18:04 ` [Bug fortran/105759] " kargl at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-05-28 15:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105759
           Summary: is_contiguous(zero_size_array(2:0)) wrongly returns
                    .true.
           Product: gcc
           Version: 13.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 and ifort both return T for the following code:

integer :: a(2)
print *, is_contiguous(a(2:1))
end


However, I think that should be F / .false. as F2018 has:

8.5.7 CONTIGUOUS attribute
...
An object is contiguous if it is
...
(7) a nonzero-sized array section (9.5.3) provided that
...


Disclaimer: I might have missed something.


If it is a bug, then we probably need to fix both the simplify.cc compile-time
and libgfortran run-time check.

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

end of thread, other threads:[~2022-05-31 16:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-28 15:48 [Bug fortran/105759] New: is_contiguous(zero_size_array(2:0)) wrongly returns .true burnus at gcc dot gnu.org
2022-05-28 18:04 ` [Bug fortran/105759] " kargl at gcc dot gnu.org
2022-05-31  9:59 ` anlauf at gcc dot gnu.org
2022-05-31 16:27 ` sgk at troutmask dot apl.washington.edu

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).