https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72791
Bug ID: 72791 Summary: Internal compiler error for reshape intrinsic Product: gcc Version: 5.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: patrick.seewald at gmail dot com Target Milestone: --- I get an internal compiler error (Segmentation fault) when compiling the following program program reshape_bug integer, dimension(2) :: order1 integer, dimension(1) :: order2 real, dimension(2,2,2) :: arr1, arr2 order1 = [1,2] order2 = [3] arr2 = reshape(arr1, shape=shape(arr2), order=[order1,order2]) end program with $ gfortran reshape_bug.f90 Complete output: f951: internal compiler error: Segmentation fault 0xa7040f crash_signal /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/toplev.c:383 0x5fe04f gfc_check_reshape(gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*) /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/check.c:3848 0x62f7b2 check_specific /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/intrinsic.c:4228 0x63d8cd gfc_intrinsic_func_interface(gfc_expr*, int) /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/intrinsic.c:4443 0x67cddf resolve_unknown_f /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/resolve.c:2704 0x67cddf resolve_function /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/resolve.c:2999 0x67cddf gfc_resolve_expr(gfc_expr*) /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/resolve.c:6256 0x6816e1 gfc_resolve_code(gfc_code*, gfc_namespace*) /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/resolve.c:10189 0x684272 resolve_codes /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/resolve.c:15178 0x684361 gfc_resolve /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/resolve.c:15212 0x66fe8a resolve_all_program_units /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/parse.c:5345 0x66fe8a gfc_parse_file() /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/parse.c:5588 0x6aeee5 gfc_be_parse_file /data/software/cp2k/tools/toolchain/build/gcc-5.4.0/gcc/fortran/f95-lang.c:229 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.