public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/110658] New: MINVAL/MAXVAL and deferred-length character arrays
@ 2023-07-13 18:26 anlauf at gcc dot gnu.org
  2023-07-16 19:34 ` [Bug fortran/110658] " anlauf at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-07-13 18:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110658
           Summary: MINVAL/MAXVAL and deferred-length character arrays
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gcc dot gnu.org
  Target Milestone: ---

Spin-off from pr110288:

program p
  character(len=2), allocatable :: fixed(:)
  character(len=:), allocatable :: array(:)
  fixed = ["bb", "aa"]
  array = ["bb", "aa"]
  print *, minval (fixed) ! OK
  print *, maxval (array) ! runtime error
end

While the MINVAL for the fixed-length character array works fine,
the MAXVAL for the deferred-length character array gives at runtime:

a.out: ../../../gcc-trunk/libgfortran/generated/maxval0_s1.c:68: maxval0_s1:
Assertion `xlen == len' failed.

All versions since gcc-8 (when MINVAL/MAXVAL of character was implemented)
fail.

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

end of thread, other threads:[~2023-07-20 19:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-13 18:26 [Bug fortran/110658] New: MINVAL/MAXVAL and deferred-length character arrays anlauf at gcc dot gnu.org
2023-07-16 19:34 ` [Bug fortran/110658] " anlauf at gcc dot gnu.org
2023-07-16 20:31 ` anlauf at gcc dot gnu.org
2023-07-17 18:49 ` cvs-commit at gcc dot gnu.org
2023-07-18 18:40 ` cvs-commit at gcc dot gnu.org
2023-07-20 18:56 ` cvs-commit at gcc dot gnu.org
2023-07-20 19:06 ` cvs-commit at gcc dot gnu.org
2023-07-20 19:06 ` anlauf 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).