https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87244
Bug ID: 87244 Summary: Failure to compile an allocate statement of variable length Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: george.mesina at inl dot gov Target Milestone: --- Created attachment 44666 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44666&action=edit File being compiled, timecomp.F90, is attached VERSION of GFORTRAN gfortran -v COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/apps/local/easybuild/software/GCC/4.9.2/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --enable-languages=c,c++,fortran,lto --enable-lto --enable-checking=release --disable-multilib --enable-shared=yes --enable-static=yes --enable-threads=posix --enable-gold=default --enable-plugins --enable-ld --with-plugin-ld=ld.gold --prefix=/apps/local/easybuild/software/GCC/4.9.2 --with-local-prefix=/apps/local/easybuild/software/GCC/4.9.2 --enable-bootstrap --with-cloog=/apps/local/easybuild/build/GCC/4.9.2/dummy-dummy/gcc-4.9.2/stage2_stuff --with-isl=/apps/local/easybuild/build/GCC/4.9.2/dummy-dummy/gcc-4.9.2/stage2_stuff Thread model: posix PLATFORM: uname -a Linux falcon2 3.0.101-108.35-default #1 SMP Mon Feb 19 21:13:08 UTC 2018 (251ec24) x86_64 x86_64 x86_64 GNU/Linux COMMAND gfortran -Wall -Wconversion -pedantic -fbounds-check -fbacktrace -fdefault-integer-8 -fdefault-real-8 -c -g -O2 -o timecomp.x timecomp.F90 timecomp.F90: In function ‘getfiledata’: timecomp.F90:209:0: internal compiler error: Segmentation fault allocate (fnames(10+nlines), source = blanks) ^ 0x9a066f crash_signal ../../gcc/toplev.c:337 0x7f4100 fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:1952 0x68021f gfc_array_init_size ../../gcc/fortran/trans-array.c:5085 0x68021f gfc_array_allocate(gfc_se*, gfc_expr*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node**, gfc_expr*, gfc_typespec*) ../../gcc/fortran/trans-array.c:5237 0x6c8859 gfc_trans_allocate(gfc_code*) ../../gcc/fortran/trans-stmt.c:4952 0x6740c7 trans_code ../../gcc/fortran/trans.c:1794 0x6c0973 gfc_trans_if_1 ../../gcc/fortran/trans-stmt.c:986 0x6c672a gfc_trans_if(gfc_code*) ../../gcc/fortran/trans-stmt.c:1017 0x6741a7 trans_code ../../gcc/fortran/trans.c:1736 0x69366b gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:5653 0x693907 gfc_generate_contained_functions ../../gcc/fortran/trans-decl.c:4771 0x693907 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:5589 0x6333d0 translate_all_program_units ../../gcc/fortran/parse.c:4953 0x6333d0 gfc_parse_file() ../../gcc/fortran/parse.c:5150 0x6703a5 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. File being compiled, timecomp.F90, is attached.