This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/78152] New: coarray and associate


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

            Bug ID: 78152
           Summary: coarray and associate
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: physiker at toast2 dot net
  Target Milestone: ---

The following source file, bug.f90, is rejected by gfortran version 7 and 6.
Gfortran version 5.4 compiles the code. I believe this is a regression.

cat bug.f90
program co_assoc
  implicit none
  integer, parameter :: p = 5
  real, allocatable :: a(:,:)[:,:]
  allocate (a(p,p)[2,*])
  associate (i => a(1:p, 1:p))
  end associate
end program co_assoc

LANG=C caf -o bug bug.f90 -W -Wall -v
mpifort for MPICH version 3.1.4
Driving: gfortran-7 -Wl,-flat_namespace -o bug bug.f90 -W -Wall -v -L
/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/lib
-fcoarray=lib -lcaf_mpi
-I/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/mpich/3.1.4/include
-I/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/mpich/3.1.4/include
-L/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/mpich/3.1.4/lib
-lmpifort -lmpi -lpmpi -mmacosx-version-min=10.9.4 -l gfortran -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran-7
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/7.0.0/lto-wrapper
Target: x86_64-apple-darwin13.4.0
Configured with: ../gcc/configure --enable-languages=c,c++,fortran,lto
--with-gmp=/sw --with-libiconv-prefix=/sw --with-isl=/sw --with-mpc=/sw
--with-system-zlib --program-suffix=-7
Thread model: posix
gcc version 7.0.0 20161025 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-o' 'bug' '-Wextra' '-Wall' '-v'
'-L/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/lib'
'-fcoarray=lib' '-I'
'/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/mpich/3.1.4/include'
'-I'
'/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/mpich/3.1.4/include'
'-L/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/mpich/3.1.4/lib'
'-mmacosx-version-min=10.9.4' '-shared-libgcc' '-mtune=core2'
 /usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/7.0.0/f951 bug.f90 -I
/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/mpich/3.1.4/include
-I
/Users/Peter/Downloads/tmp/opencoarrays/prerequisites/installations/mpich/3.1.4/include
-fPIC -quiet -dumpbase bug.f90 -mmacosx-version-min=10.9.4 -mtune=core2
-auxbase bug -Wextra -Wall -version -fcoarray=lib -fintrinsic-modules-path
/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/7.0.0/finclude -o
/var/folders/97/4qnhjhtn25s86s9hkz0h37_m0000gn/T//cc7JcB1e.s
GNU Fortran (GCC) version 7.0.0 20161025 (experimental)
(x86_64-apple-darwin13.4.0)
        compiled by GNU C version 7.0.0 20161025 (experimental), GMP version
6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran2008 (GCC) version 7.0.0 20161025 (experimental)
(x86_64-apple-darwin13.4.0)
        compiled by GNU C version 7.0.0 20161025 (experimental), GMP version
6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
bug.f90:6:29:

   associate (i => a(1:p, 1:p))
                             1
Error: Variable 'i' at (1) is a coarray and is not ALLOCATABLE, SAVE nor a
dummy argument


gcc-5.4:
mpifort for MPICH version 3.1.4
Driving: gfortran-fsf-5 -mmacosx-version-min=10.9.4 -Wl,-flat_namespace -o bug
bug.f90 -W -Wall -v -L
/Users/Peter/Downloads/OpenCoarrays-1.4.0/opencoarrays-build/lib -fcoarray=lib
-lcaf_mpi
-I/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include
-I/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include
-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/lib
-lmpifort -lmpi -lpmpi -l gfortran -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran-fsf-5
COLLECT_LTO_WRAPPER=/sw/lib/gcc5/libexec/gcc/x86_64-apple-darwin13.4.0/5.4.0/lto-wrapper
Target: x86_64-apple-darwin13.4.0
Configured with: ../gcc-5.4.0/configure --prefix=/sw --prefix=/sw/lib/gcc5
--mandir=/sw/share/man --infodir=/sw/lib/gcc5/info
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-isl=/sw --with-mpc=/sw --with-system-zlib
--program-suffix=-fsf-5
Thread model: posix
gcc version 5.4.0 (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.9.4' '-o' 'bug' '-Wextra' '-Wall'
'-v' '-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/opencoarrays-build/lib'
'-fcoarray=lib' '-I'
'/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include'
'-I'
'/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include'
'-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/lib'
'-shared-libgcc' '-mtune=core2'
 /sw/lib/gcc5/libexec/gcc/x86_64-apple-darwin13.4.0/5.4.0/f951 bug.f90 -I
/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include
-I
/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include
-fPIC -quiet -dumpbase bug.f90 -mmacosx-version-min=10.9.4 -mtune=core2
-auxbase bug -Wextra -Wall -version -fcoarray=lib -fintrinsic-modules-path
/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0/finclude -o
/var/folders/97/4qnhjhtn25s86s9hkz0h37_m0000gn/T//ccNZlpo1.s
GNU Fortran (GCC) version 5.4.0 (x86_64-apple-darwin13.4.0)
        compiled by GNU C version 5.4.0, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (GCC) version 5.4.0 (x86_64-apple-darwin13.4.0)
        compiled by GNU C version 5.4.0, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.9.4' '-o' 'bug' '-Wextra' '-Wall'
'-v' '-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/opencoarrays-build/lib'
'-fcoarray=lib' '-I'
'/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include'
'-I'
'/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include'
'-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/lib'
'-shared-libgcc' '-mtune=core2'
 as -arch x86_64 -force_cpusubtype_ALL -o
/var/folders/97/4qnhjhtn25s86s9hkz0h37_m0000gn/T//cc2yTmpr.o
/var/folders/97/4qnhjhtn25s86s9hkz0h37_m0000gn/T//ccNZlpo1.s
Reading specs from
/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0/../../../libgfortran.spec
rename spec lib to liborig
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.9.4' '-o' 'bug' '-Wextra' '-Wall'
'-v' '-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/opencoarrays-build/lib'
'-fcoarray=lib' '-I'
'/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include'
'-I'
'/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include'
'-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/lib'
'-shared-libgcc' '-mtune=core2'
COMPILER_PATH=/sw/lib/gcc5/libexec/gcc/x86_64-apple-darwin13.4.0/5.4.0/:/sw/lib/gcc5/libexec/gcc/x86_64-apple-darwin13.4.0/5.4.0/:/sw/lib/gcc5/libexec/gcc/x86_64-apple-darwin13.4.0/:/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0/:/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/
LIBRARY_PATH=/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0/:/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0/../../../:/usr/lib/
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.9.4' '-o' 'bug' '-Wextra' '-Wall'
'-v' '-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/opencoarrays-build/lib'
'-fcoarray=lib' '-I'
'/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include'
'-I'
'/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/include'
'-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/lib'
'-shared-libgcc' '-mtune=core2'
 /sw/lib/gcc5/libexec/gcc/x86_64-apple-darwin13.4.0/5.4.0/collect2 -dynamic
-arch x86_64 -macosx_version_min 10.9.4 -weak_reference_mismatches non-weak -o
bug -L/Users/Peter/Downloads/OpenCoarrays-1.4.0/opencoarrays-build/lib
-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/lib
-L/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0
-L/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0/../../.. -flat_namespace
/var/folders/97/4qnhjhtn25s86s9hkz0h37_m0000gn/T//cc2yTmpr.o -lcaf_mpi
-lmpifort -lmpi -lpmpi -lgfortran -no_compact_unwind -lSystem -lgcc_ext.10.5
-lgcc -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
collect2 version 5.4.0
/usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.9.4
-weak_reference_mismatches non-weak -o bug
-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/opencoarrays-build/lib
-L/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/lib
-L/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0
-L/sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0/../../.. -flat_namespace
/var/folders/97/4qnhjhtn25s86s9hkz0h37_m0000gn/T//cc2yTmpr.o -lcaf_mpi
-lmpifort -lmpi -lpmpi -lgfortran -no_compact_unwind -lSystem -lgcc_ext.10.5
-lgcc -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
@(#)PROGRAM:ld  PROJECT:ld64-241.9
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h
armv6m armv7m armv7em
Library search paths:
        /Users/Peter/Downloads/OpenCoarrays-1.4.0/opencoarrays-build/lib
       
/Users/Peter/Downloads/OpenCoarrays-1.4.0/install_prerequisites/mpich-3.1.4-installation/lib
        /sw/lib/gcc5/lib/gcc/x86_64-apple-darwin13.4.0/5.4.0
        /sw/lib/gcc5/lib
        /usr/lib
        /usr/local/lib
Framework search paths:
        /Library/Frameworks/
        /System/Library/Frameworks/
 /usr/bin/nm -n /var/folders/97/4qnhjhtn25s86s9hkz0h37_m0000gn/T//cc2yTmpr.o

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]