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

            Bug ID: 66605
           Summary: -Wunused-parameter causes internal compiler error with
                    gfortran 5.1.0
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kyle.niemeyer at gmail dot com
  Target Milestone: ---

This small module causes an ICE in gfortran 5.1.0, when compiled with the
-Wunused-parameter flag:

MODULE test
        IMPLICIT NONE
        INTEGER, PARAMETER :: wp = KIND(1.0D0)
CONTAINS
SUBROUTINE sub (neq, time, y, dydt)
        IMPLICIT NONE    
    INTEGER :: neq
        REAL(WP) :: time, y(neq), dydt(neq)

        dydt(1) = 1.0 / y(1)
END SUBROUTINE sub
END MODULE

Here are the results from "gfortran -v -save-temps -Wunused-parameter -c
test.f90":

Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-apple-darwin14.3.0
Configured with: ../configure --build=x86_64-apple-darwin14.3.0
--prefix=/usr/local/Cellar/gcc/5.1.0
--libdir=/usr/local/Cellar/gcc/5.1.0/lib/gcc/5
--enable-languages=c,c++,objc,obj-c++,fortran,java,jit --program-suffix=-5
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl
--with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking
--enable-checking=release --enable-lto --with-build-config=bootstrap-debug
--disable-werror --with-pkgversion='Homebrew gcc 5.1.0 --with-all-languages
--without-multilib' --with-bugurl=https://github.com/Homebrew/homebrew/issues
--enable-plugin --disable-nls
--with-ecj-jar=/usr/local/opt/ecj/share/java/ecj.jar --disable-multilib
--enable-host-shared
Thread model: posix
gcc version 5.1.0 (Homebrew gcc 5.1.0 --with-all-languages --without-multilib) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.10.3' '-v' '-save-temps'
'-Wunused-parameter' '-c' '-mtune=core2'
 /usr/local/Cellar/gcc/5.1.0/libexec/gcc/x86_64-apple-darwin14.3.0/5.1.0/f951
test.f90 -fPIC -quiet -dumpbase test.f90 -mmacosx-version-min=10.10.3
-mtune=core2 -auxbase test -Wunused-parameter -version -fintrinsic-modules-path
/usr/local/Cellar/gcc/5.1.0/lib/gcc/5/gcc/x86_64-apple-darwin14.3.0/5.1.0/finclude
-o test.s
GNU Fortran (Homebrew gcc 5.1.0 --with-all-languages --without-multilib)
version 5.1.0 (x86_64-apple-darwin14.3.0)
        compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (Homebrew gcc 5.1.0 --with-all-languages --without-multilib)
version 5.1.0 (x86_64-apple-darwin14.3.0)
        compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
'
test.f90:18:0:

 END SUBROUTINE sub
 1
in pp_format, at pretty-print.c:614

Internal compiler error: Error reporting routines re-entered.
gfortran: internal compiler error: Abort trap: 6 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew/issues> for instructions.

Reply via email to