http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55174
Bug #: 55174 Summary: internal compiler error: Segmentation fault with bad array reference Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: john.har...@vuw.ac.nz This 4-line Fortran program has an error at line 3, where array(*) is of course not permitted as an argument of a function. implicit none integer:: array(2)=(/42,666/) print *, size(array(*)) end Other compilers (g95, ifort) correctly diagnose the error but gfortran 4.8.0 gives an internal compiler error: Segmentation fault and asks me to tell you. My compile-time output follows. cayley[~/Jfh] % /local/scratch/gf/bin/gfortran -v trybadstar.f90 Driving: /local/scratch/gf/bin/gfortran -v trybadstar.f90 -l gfortran -l m -shared-libgcc Using built-in specs. COLLECT_GCC=/local/scratch/gf/bin/gfortran COLLECT_LTO_WRAPPER=/local/scratch/gf/libexec/gcc/i686-pc-linux-gnu/4.8.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: /local/scratch/gcc-4.8-20120701/configure --prefix=/local/scratch/gf --enable-languages=c,fortran --disable-libada --with-local-prefix=/local/scratch --with-gmp=/local/scratch Thread model: posix gcc version 4.8.0 20120701 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=pentiumpro' /local/scratch/gf/libexec/gcc/i686-pc-linux-gnu/4.8.0/f951 trybadstar.f90 -quiet -dumpbase trybadstar.f90 -mtune=generic -march=pentiumpro -auxbase trybadstar -version -fintrinsic-modules-path /local/scratch/gf/lib/gcc/i686-pc-linux-gnu/4.8.0/finclude -o /tmp/cccgAIgM.s GNU Fortran (GCC) version 4.8.0 20120701 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.8.0 20120701 (experimental), GMP version 5.0.5, MPFR version 3.1.0, MPC version 0.9 warning: GMP header version 5.0.5 differs from library version 5.0.3. warning: MPFR header version 3.1.0 differs from library version 3.1.0-p3. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU Fortran (GCC) version 4.8.0 20120701 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.8.0 20120701 (experimental), GMP version 5.0.5, MPFR version 3.1.0, MPC version 0.9 warning: GMP header version 5.0.5 differs from library version 5.0.3. warning: MPFR header version 3.1.0 differs from library version 3.1.0-p3. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 f951: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. cayley[~/Jfh] %