public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102689] New: Segfault with RESHAPE of CLASS as actual argument
@ 2021-10-11 20:00 burnus at gcc dot gnu.org
  2023-11-29 10:35 ` [Bug fortran/102689] " pault at gcc dot gnu.org
  2023-11-30 14:15 ` pault at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-11 20:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102689
           Summary: Segfault with RESHAPE of CLASS as actual argument
           Product: gcc
           Version: 12.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: ---

Created attachment 51586
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51586&action=edit
testcase - compile & run (fails with segfault at marked line)

Dummy and actual argument are CLASS, then:

   call class_bar (RESHAPE (B, [100]))

will segfault at runtime.  Besides the actual crash, the question is why there
is a call to the library at all:

      _gfortran_reshape_4 (&atmp.25, D.4357, D.4383, 0B, 0B);

At least for most common cases, it looks as if this should be inlined.

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

end of thread, other threads:[~2023-11-30 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 20:00 [Bug fortran/102689] New: Segfault with RESHAPE of CLASS as actual argument burnus at gcc dot gnu.org
2023-11-29 10:35 ` [Bug fortran/102689] " pault at gcc dot gnu.org
2023-11-30 14:15 ` pault 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).