public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/109171] New: initialization using %re causes segfault, as an assignment does not
@ 2023-03-17  9:33 urbanjost at comcast dot net
  2023-03-17  9:35 ` [Bug fortran/109171] " urbanjost at comcast dot net
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: urbanjost at comcast dot net @ 2023-03-17  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109171
           Summary: initialization using %re causes segfault, as an
                    assignment does not
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: urbanjost at comcast dot net
  Target Milestone: ---

program boom
implicit none
complex, save, target :: a(4)
#ifdef INITIALIZE
real, pointer         :: p(:) => a(1:3:2)%re
#else
real, pointer         :: p(:) 
   p => a(1:3:2)%re
#endif
   a = [(1., 0.), (2., 0.), (3., 0.), (4., 0)]
   print *, p
end program boom

when compiles with "gfortran" and so using the assignment it works; when
compiled with "gfortran -DINITIALIZE" it compiles but gets a segfault on
execution.

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

end of thread, other threads:[~2023-03-30 19:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17  9:33 [Bug fortran/109171] New: initialization using %re causes segfault, as an assignment does not urbanjost at comcast dot net
2023-03-17  9:35 ` [Bug fortran/109171] " urbanjost at comcast dot net
2023-03-17 20:39 ` anlauf at gcc dot gnu.org
2023-03-17 22:41 ` urbanjost at comcast dot net
2023-03-17 22:56 ` urbanjost at comcast dot net
2023-03-30 19:16 ` 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).