[Bug fortran/66681] New: Wrong result in assigning this_image() to a complex coarray

damian at sourceryinstitute dot org gcc-bugzilla@gcc.gnu.org
Fri Jun 26 14:14:00 GMT 2015


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



More information about the Gcc-bugs mailing list