https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88912
Bug ID: 88912 Summary: Fortran compiler segfaults when pre-include file is not found Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: sje at gcc dot gnu.org Target Milestone: --- I am using the new -pre-include=<file> option with Fortran and when the file I am trying to preinclude does not exist the compiler segfaults. % install/usr/bin/gfortran -fpre-include=/tmp/foo.h -Ofast -S x.f90 <built-in>: internal compiler error: Segmentation fault 0xcb1f37 crash_signal /home/sellcey/gcc-vect-fortran/src/gcc/gcc/toplev.c:326 0x6ca5dc load_file /home/sellcey/gcc-vect-fortran/src/gcc/gcc/fortran/scanner.c:2481 0x6ca76b gfc_new_file() /home/sellcey/gcc-vect-fortran/src/gcc/gcc/fortran/scanner.c:2681 0x6f0b97 gfc_init /home/sellcey/gcc-vect-fortran/src/gcc/gcc/fortran/f95-lang.c:250 0x6164b3 lang_dependent_init /home/sellcey/gcc-vect-fortran/src/gcc/gcc/toplev.c:1929 0x6164b3 do_compile /home/sellcey/gcc-vect-fortran/src/gcc/gcc/toplev.c:2161 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. % install/usr/bin/gfortran -v Using built-in specs. COLLECT_GCC=install/usr/bin/gfortran COLLECT_LTO_WRAPPER=/home/sellcey/gcc-vect-fortran/install/usr/libexec/gcc/aarch64-linux-gnu/9.0.0/lto-wrapper Target: aarch64-linux-gnu Configured with: /home/sellcey/gcc-vect-fortran/src/gcc/configure --prefix=/home/sellcey/gcc-vect-fortran/install/usr --target=aarch64-linux-gnu --host=aarch64-linux-gnu --build=aarch64-linux-gnu --enable-gnu-indirect-function --with-sysroot=/home/sellcey/gcc-vect-fortran/install --enable-languages=c,c++,fortran --disable-libsanitizer --disable-bootstrap --enable-threads --enable-shared Thread model: posix gcc version 9.0.0 20190117 (experimental) (GCC)