public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66681] New: Wrong result in assigning this_image() to a complex coarray
@ 2015-06-26 14:14 damian at sourceryinstitute dot org
  2015-09-07  5:24 ` [Bug fortran/66681] " pault at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: damian at sourceryinstitute dot org @ 2015-06-26 14:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66681
           Summary: Wrong result in assigning this_image() to a complex
                    coarray
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: damian at sourceryinstitute dot org
  Target Milestone: ---

The following problem disappears if the variable declaration is for an integer
or real or if it contains the allocatable attribute and a subsequent allocation
happens:

localhost:gnu rouson$ cat assign_this_image_to_complex.f90 
complex a[*]
a = this_image()
print *,this_image(),a 
end
localhost:gnu rouson$ gfortran assign_this_image_to_complex.f90
-fcoarray=single
localhost:gnu rouson$ ./a.out
           1 (  0.00000000    ,  0.00000000    )
localhost:gnu rouson$ mpif90 assign_this_image_to_complex.f90 -fcoarray=lib -L
/opt/opencoarrays/gnu/6.0.0/lib -lcaf_mpi
localhost:gnu rouson$ mpirun -np 1 ./a.out
           1 (  0.00000000    , -4.65661287E-10)
localhost:gnu rouson$ gfortran --version
GNU Fortran (MacPorts gcc6 6-20150614_0) 6.0.0 20150614 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

localhost:gnu rouson$ mpif90 --version
GNU Fortran (MacPorts gcc6 6-20150614_0) 6.0.0 20150614 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING


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

end of thread, other threads:[~2015-10-24 13:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26 14:14 [Bug fortran/66681] New: Wrong result in assigning this_image() to a complex coarray damian at sourceryinstitute dot org
2015-09-07  5:24 ` [Bug fortran/66681] " pault at gcc dot gnu.org
2015-09-07  9:31 ` dominiq at lps dot ens.fr
2015-09-07  9:44 ` pault at gcc dot gnu.org
2015-09-07  9:50 ` dominiq at lps dot ens.fr
2015-09-07 12:58 ` pault at gcc dot gnu.org
2015-10-24  9:14 ` dominiq at lps dot ens.fr
2015-10-24 12:36 ` pault at gcc dot gnu.org
2015-10-24 13:06 ` dominiq at lps dot ens.fr

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).