public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/109348] New: Pointer initialization fails for target with references
@ 2023-03-30 18:59 pault at gcc dot gnu.org
2023-03-30 19:16 ` [Bug fortran/109348] " anlauf at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-30 18:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109348
Bug ID: 109348
Summary: Pointer initialization fails for target with
references
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: pault at gcc dot gnu.org
Target Milestone: ---
As posted by Peter Klausler on clf
complex, save, target :: a(4) = [(1.,0.),(2.,0.),(3.,0.),(4.,0)]
real, pointer :: p(:) => a(1:3:2)%re
print *, p
end
gfc doesn't even attempt to initialise the pointer. Malcolm Cohen and Steve
Lionel both agree that this is valid F2018.
complex, save, target :: a(4) = [(1.,0.),(2.,0.),(3.,0.),(4.,0)]
real, pointer :: p(:)
p(1:) => a(1:3:2)%re
print *, p
end
Works, as long as an lbound is provided on the lhs. nagfor behaves similarly,
whereas ifort does not even accept this version.
Cheers
Paul
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/109348] Pointer initialization fails for target with references
2023-03-30 18:59 [Bug fortran/109348] New: Pointer initialization fails for target with references pault at gcc dot gnu.org
@ 2023-03-30 19:16 ` anlauf at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-03-30 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109348
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |anlauf at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #1 from anlauf at gcc dot gnu.org ---
Reported already in pr109171.
*** This bug has been marked as a duplicate of bug 109171 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-30 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 18:59 [Bug fortran/109348] New: Pointer initialization fails for target with references pault at gcc dot gnu.org
2023-03-30 19:16 ` [Bug fortran/109348] " 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).