https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93500
Bug ID: 93500 Summary: ICE in gfc_numeric_ts, at fortran/expr.c:891 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Also derived from pr92961, with a subroutine/function : $ cat z0.f90 program p integer :: a(min(2,0)/0) integer :: b = lbound(a) end $ cat z1.f90 subroutine s integer :: a(min(2,0)/0) integer :: b = lbound(a) end $ gfortran-10-20200126 -c z0.f90 z0.f90:2:19: 2 | integer :: a(min(2,0)/0) | 1 Error: Division by zero at (1) z0.f90:3:25: 3 | integer :: b = lbound(a) | 1 Error: 'array' argument of 'lbound' intrinsic at (1) must be an array $ gfortran-10-20200126 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbac5cf crash_signal ../../gcc/toplev.c:328 0x64cb80 gfc_numeric_ts(gfc_typespec*) ../../gcc/fortran/expr.c:891 0x6c1510 resolve_operator ../../gcc/fortran/resolve.c:4029 0x6be9a7 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:6993 0x618a14 resolve_array_bound ../../gcc/fortran/array.c:377 0x619686 gfc_resolve_array_spec(gfc_array_spec*, int) ../../gcc/fortran/array.c:421 0x6cf886 simplify_bound_dim ../../gcc/fortran/simplify.c:4014 0x6cfdef simplify_bound ../../gcc/fortran/simplify.c:4181 0x65ea07 do_simplify ../../gcc/fortran/intrinsic.c:4617 0x669108 gfc_intrinsic_func_interface(gfc_expr*, int) ../../gcc/fortran/intrinsic.c:4882 0x64e6c7 gfc_check_init_expr(gfc_expr*) ../../gcc/fortran/expr.c:2887 0x64ebe7 gfc_reduce_init_expr(gfc_expr*) ../../gcc/fortran/expr.c:3067 0x651e00 gfc_match_init_expr(gfc_expr**) ../../gcc/fortran/expr.c:3113 0x63de2c variable_decl ../../gcc/fortran/decl.c:2853 0x63de2c gfc_match_data_decl() ../../gcc/fortran/decl.c:6120 0x6a0443 match_word ../../gcc/fortran/parse.c:65 0x6a0443 decode_statement ../../gcc/fortran/parse.c:376 0x6a1e8a next_free ../../gcc/fortran/parse.c:1279 0x6a1e8a next_statement ../../gcc/fortran/parse.c:1511 0x6a34db parse_spec ../../gcc/fortran/parse.c:3922