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

            Bug ID: 70817
           Summary: Internal compiler error coarrays -finit-real=snan
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: physiker at toast2 dot net
  Target Milestone: ---

Compiling the file t.f90 causes gfortran version 5.3 (OpenCoarrays-1.4.0) and
gcc-6.0.1-RC-20160423 (OpenCoarrays current git version) to crash with an
internal compiler error. Without the option -finit-real=snan the code compiles
without errors.

t.f90
   PROGRAM f
      IMPLICIT NONE
      REAL(4), PARAMETER :: zero = 0.0e0_4
      INTEGER :: n[*]
      REAL (4) :: p[*]
      REAL (4) :: h

      n = 1
      h = REAL(n, KIND=4)
      p = zero

    END PROGRAM f

Driving: gfortran-6 -Wl,-flat_namespace --verbose t.f90 -finit-real=snan -L
/Users/Peter/Downloads/opencoarrays/opencoarrays-build/lib -fcoarray=lib
-lcaf_mpi
-I/Users/Peter/Downloads/opencoarrays/prerequisites/mpich-3.1.4-installation/include
-I/Users/Peter/Downloads/opencoarrays/prerequisites/mpich-3.1.4-installation/include
-L/Users/Peter/Downloads/opencoarrays/prerequisites/mpich-3.1.4-installation/lib
-lmpifort -lmpi -lpmpi -mmacosx-version-min=10.9.4 -l gfortran -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran-6
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/6.0.1/lto-wrapper
Target: x86_64-apple-darwin13.4.0
Configured with: ../gcc-6.0.1-RC-20160423/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=-6
Thread model: posix
gcc version 6.0.1 20160423 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-finit-real=snan'
'-L/Users/Peter/Downloads/opencoarrays/opencoarrays-build/lib' '-fcoarray=lib'
'-I'
'/Users/Peter/Downloads/opencoarrays/prerequisites/mpich-3.1.4-installation/include'
'-I'
'/Users/Peter/Downloads/opencoarrays/prerequisites/mpich-3.1.4-installation/include'
'-L/Users/Peter/Downloads/opencoarrays/prerequisites/mpich-3.1.4-installation/lib'
'-mmacosx-version-min=10.9.4' '-shared-libgcc' '-mtune=core2'
 /usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/6.0.1/f951 t.f90 -I
/Users/Peter/Downloads/opencoarrays/prerequisites/mpich-3.1.4-installation/include
-I
/Users/Peter/Downloads/opencoarrays/prerequisites/mpich-3.1.4-installation/include
-fPIC -quiet -dumpbase t.f90 -mmacosx-version-min=10.9.4 -mtune=core2 -auxbase
t -version -finit-real=snan -fcoarray=lib -fintrinsic-modules-path
/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.1/finclude -o
/var/folders/97/4qnhjhtn25s86s9hkz0h37_m0000gn/T//cc821ws8.s
GNU Fortran (GCC) version 6.0.1 20160423 (prerelease)
(x86_64-apple-darwin13.4.0)
        compiled by GNU C version 6.0.1 20160423 (prerelease), GMP version
6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.14 or 0.13
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (GCC) version 6.0.1 20160423 (prerelease)
(x86_64-apple-darwin13.4.0)
        compiled by GNU C version 6.0.1 20160423 (prerelease), GMP version
6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.14 or 0.13
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
t.f90:5:0:

       REAL (4) :: p[*]

internal compiler error: in fold_convert_loc, at fold-const.c:2256

t.f90:5:0: internal compiler error: Abort trap: 6
gfortran-6: internal compiler error: Abort trap: 6 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to