https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85138
--- Comment #4 from Andrew Benson <abensonca at gmail dot com> ---
A related but possibly different ICE:
module fox_m_fsys_format
interface len
module procedure str_real_dp_len, str_real_dp_fmt_len
end interface
contains
pure function str_real_dp_fmt_len(x, fmt) result(n)
real, intent(in) :: x
character(len=*), intent(in) :: fmt
if (.not.checkFmt(fmt)) then
endif
end function str_real_dp_fmt_len
pure function str_real_dp_len(x) result(n)
real, intent(in) :: x
end function str_real_dp_len
pure function str_real_dp_array_len(xa) result(n)
real, dimension(:), intent(in) :: xa
end function str_real_dp_array_len
pure function str_real_dp_array_fmt_len(xa, fmt) result(n)
real, dimension(:), intent(in) :: xa
character(len=*), intent(in) :: fmt
end function str_real_dp_array_fmt_len
pure function str_real_dp_fmt(x, fmt) result(s)
real, intent(in) :: x
character(len=*), intent(in) :: fmt
character(len=len(x, fmt)) :: s
end function str_real_dp_fmt
pure function checkFmt(fmt) result(good)
character(len=*), intent(in) :: fmt
logical :: good
end function checkFmt
end module fox_m_fsys_format
$ gfortran -c tmp6.F90
if (.not.checkFmt(fmt)) then
internal compiler error: Segmentation fault
0xd2f4cf crash_signal
../../gcc-trunk/gcc/toplev.c:325
0x7f434bb321ef ???
/data001/abenson/Galacticus/Tools/glibc-2.12.1/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x881660 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc,
vl_embed>*)
../../gcc-trunk/gcc/fortran/trans-expr.c:4890
0x886eaa gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc-trunk/gcc/fortran/trans-expr.c:7922
0x889cc7 gfc_conv_expr_val(gfc_se*, gfc_expr*)
../../gcc-trunk/gcc/fortran/trans-expr.c:7975
0x889d61 gfc_conv_unary_op
../../gcc-trunk/gcc/fortran/trans-expr.c:2799
0x887060 gfc_conv_expr_op
../../gcc-trunk/gcc/fortran/trans-expr.c:3317
0x887060 gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc-trunk/gcc/fortran/trans-expr.c:7918
0x889cc7 gfc_conv_expr_val(gfc_se*, gfc_expr*)
../../gcc-trunk/gcc/fortran/trans-expr.c:7975
0x8c00d7 gfc_trans_if_1
../../gcc-trunk/gcc/fortran/trans-stmt.c:1427
0x8c8dba gfc_trans_if(gfc_code*)
../../gcc-trunk/gcc/fortran/trans-stmt.c:1464
0x84ca37 trans_code
../../gcc-trunk/gcc/fortran/trans.c:1916
0x878a2d gfc_generate_function_code(gfc_namespace*)
../../gcc-trunk/gcc/fortran/trans-decl.c:6507
0x850cc1 gfc_generate_module_code(gfc_namespace*)
../../gcc-trunk/gcc/fortran/trans.c:2222
0x80333b translate_all_program_units
../../gcc-trunk/gcc/fortran/parse.c:6108
0x80333b gfc_parse_file()
../../gcc-trunk/gcc/fortran/parse.c:6324
0x849b8f gfc_be_parse_file
../../gcc-trunk/gcc/fortran/f95-lang.c:204
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.