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

            Bug ID: 89079
           Summary: "Invalid compiler error: Segmentation fault" in module
                    with "equivalence" statement
           Product: gcc
           Version: 7.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: airplanemath at aol dot com
  Target Milestone: ---

Created attachment 45534
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45534&action=edit
Fortran 90 file that produces an internal compiler error on cygwin

Compilation of the attached file on 64-bit cygwin (on 64-bit Windows 
10) produces only the .mod and .s files together with the first output 
below.  Compilation of the same file using the Mingw-w64 cross-compiler 
produces the .o file in addition to the .s and .mod files, together 
with the second output below.  How would I go about debugging this?
---
$ x86_64-pc-cygwin-gfortran -v -c test_compile.f90 -save-temps -fverbose-asm
-Wall -Wextra
Using built-in specs.
COLLECT_GCC=x86_64-pc-cygwin-gfortran
Target: x86_64-pc-cygwin
Configured with:
/cygdrive/i/szsz/tmpp/gcc/gcc-7.4.0-1.x86_64/src/gcc-7.4.0/configure
--srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-7.4.0-1.x86_64/src/gcc-7.4.0
--prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc
--docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
--build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
--without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib
--enable-shared --enable-shared-libgcc --enable-static
--enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit
--with-dwarf2 --with-tune=generic
--enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite
--enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp
--enable-libitm --enable-libquadmath --enable-libquadmath-support
--disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as
--with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix
--without-libintl-prefix --with-system-zlib --enable-linker-build-id
--with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
Thread model: posix
gcc version 7.4.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-save-temps' '-fverbose-asm' '-Wall' '-Wextra'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/f951.exe test_compile.f90 -quiet -dumpbase
test_compile.f90 -mtune=generic -march=x86-64 -auxbase test_compile -Wall
-Wextra -version -fverbose-asm -fintrinsic-modules-path
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/finclude -o test_compile.s
GNU Fortran (GCC) version 7.4.0 (x86_64-pc-cygwin)
        compiled by GNU C version 7.4.0, GMP version 6.1.2, MPFR version
4.0.1-p11, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (GCC) version 7.4.0 (x86_64-pc-cygwin)
        compiled by GNU C version 7.4.0, GMP version 6.1.2, MPFR version
4.0.1-p11, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
---
The output from the cross-compiler, which does run to completion, is 
included below:
---
$ x86_64-w64-mingw32-gfortran -v -c test_compile.f90 -save-temps -fverbose-asm
-Wall -Wextra
Using built-in specs.
COLLECT_GCC=x86_64-w64-mingw32-gfortran
Target: x86_64-w64-mingw32
Configured with:
/cygdrive/i/szsz/tmpp/cygwin64/mingw64-x86_64/mingw64-x86_64-gcc-7.4.0-1.x86_64/src/gcc-7.4.0/configure
--srcdir=/cygdrive/i/szsz/tmpp/cygwin64/mingw64-x86_64/mingw64-x86_64-gcc-7.4.0-1.x86_64/src/gcc-7.4.0
--prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc
--docdir=/usr/share/doc/mingw64-x86_64-gcc
--htmldir=/usr/share/doc/mingw64-x86_64-gcc/html -C --build=x86_64-pc-cygwin
--host=x86_64-pc-cygwin --target=x86_64-w64-mingw32 --without-libiconv-prefix
--without-libintl-prefix --with-sysroot=/usr/x86_64-w64-mingw32/sys-root
--with-build-sysroot=/usr/x86_64-w64-mingw32/sys-root --disable-multilib
--disable-win32-registry --enable-languages=c,c++,fortran,lto,objc,obj-c++
--enable-fully-dynamic-string --enable-graphite --enable-libgomp
--enable-libquadmath --enable-libquadmath-support --enable-libssp
--enable-version-specific-runtime-libs --enable-libgomp --enable-libada
--with-dwarf2 --with-gnu-ld --with-gnu-as --with-tune=generic
--with-cloog-include=/usr/include/cloog-isl --with-system-zlib
--enable-threads=posix --libexecdir=/usr/lib
Thread model: posix
gcc version 7.4.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-save-temps' '-fverbose-asm' '-Wall' '-Wextra'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-w64-mingw32/7.4.0/f951.exe test_compile.f90 -quiet
-dumpbase test_compile.f90 -mtune=generic -march=x86-64 -auxbase test_compile
-Wall -Wextra -version -fverbose-asm -fintrinsic-modules-path
/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/finclude -o test_compile.s
GNU Fortran (GCC) version 7.4.0 (x86_64-w64-mingw32)
        compiled by GNU C version 7.4.0, GMP version 6.1.2, MPFR version
4.0.1-p11, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (GCC) version 7.4.0 (x86_64-w64-mingw32)
        compiled by GNU C version 7.4.0, GMP version 6.1.2, MPFR version
4.0.1-p11, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-v' '-c' '-save-temps' '-fverbose-asm' '-Wall' '-Wextra'
'-mtune=generic' '-march=x86-64'

/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/../../../../x86_64-w64-mingw32/bin/as.exe
-v -o test_compile.o test_compile.s
GNU assembler version 2.31.1 (x86_64-w64-mingw32) using BFD version (GNU
Binutils) 2.31.1
COMPILER_PATH=/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/:/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/:/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/../../../../x86_64-w64-mingw32/bin/
LIBRARY_PATH=/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/../../../../x86_64-w64-mingw32/lib/../lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/:/usr/lib/gcc/x86_64-w64-mingw32/7.4.0/../../../../x86_64-w64-mingw32/lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/
COLLECT_GCC_OPTIONS='-v' '-c' '-save-temps' '-fverbose-asm' '-Wall' '-Wextra'
'-mtune=generic' '-march=x86-64'
---

Reply via email to