* PR 85510 - Linking error when accessing a coindexed variable inside an associate block
@ 2018-04-23 21:31 Damian Rouson
2018-04-23 21:47 ` Damian Rouson
0 siblings, 1 reply; 2+ messages in thread
From: Damian Rouson @ 2018-04-23 21:31 UTC (permalink / raw)
To: gfortran; +Cc: Rasmussen, Soren
The code below compiles without error with -fcoarray=single; whereas compiling with -fcoarray=lib generates the link-time error message shown. This occurs with the gfortran 7.2.0 and with the trunk dated 20180412. I haven’t tried other versions.
The gfortran command comes from the output of the OpenCoarrays command 'caf --show'. Some of the paths have been truncated for presentation purposes:
$ cat communicate-inside-associate.f90 module foo
contains
subroutine bar()
integer, save :: i[*]=0
associate(n=>1)
print*,i[1]
end associate
end subroutine
end module
use foo
end
$ gfortran -I/opt/opencoarrays/include/OpenCoarrays-2.0.0-26-g840374a_GNU-8.0.1 -fcoarray=lib -Wl,-rpath -Wl,/opt/mpich/3.2/lib -Wl,--enable-new-dtags communicate-inside-associate.f90 /opt/opencoarrays/lib/libcaf_mpi.a /opt/mpich/3.2/lib/libmpifort.so /opt/mpich/3.2/lib/libmpi.so
/tmp/ccA8dGYe.o: In function `_caf_init.1.3816':
communicate-inside-associate.f90:(.text+0x4d): undefined reference to `caf_token.0.3815'
/tmp/ccA8dGYe.o: In function `__foo_MOD_bar':
communicate-inside-associate.f90:(.text+0x153): undefined reference to `caf_token.0.3815'
collect2: error: ld returned 1 exit status
rouson@sourcery-VirtualBox:~/Desktop/Builds/adhoc/src/gnu/nrc/emulated-collectives$ gfortran --version
GNU Fortran (GCC) 8.0.1 20180412 (experimental)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PR 85510 - Linking error when accessing a coindexed variable inside an associate block
2018-04-23 21:31 PR 85510 - Linking error when accessing a coindexed variable inside an associate block Damian Rouson
@ 2018-04-23 21:47 ` Damian Rouson
0 siblings, 0 replies; 2+ messages in thread
From: Damian Rouson @ 2018-04-23 21:47 UTC (permalink / raw)
To: gfortran; +Cc: Rasmussen, Soren
As similar error message results if the associate construct is replaced with a block construct of the form
block
integer n
n=1
print*,i[1]
end block
The error disappears if the 'block' and 'end block' statements are deleted.
Damian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-23 21:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 21:31 PR 85510 - Linking error when accessing a coindexed variable inside an associate block Damian Rouson
2018-04-23 21:47 ` Damian Rouson
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).