https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101084
Bug ID: 101084 Summary: [10/11/12 Regression] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1124 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20191215 and 20200105 : $ cat z1.f90 program p integer, parameter :: a(0) = 1 print int(a) end $ gfortran-10-20191215 -c z1.f90 z1.f90:3:8: 3 | print int(a) | 1 Error: Constant expression in FORMAT tag at (1) must be of type default CHARACTER $ gfortran-12-20210613 -c z1.f90 z1.f90:3:8: 3 | print int(a) | 1 Warning: Legacy Extension: Non-character in FORMAT tag at (1) z1.f90:3:15: 3 | print int(a) | 1 internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1124 0x822a30 gfc_typenode_for_spec(gfc_typespec*, int) ../../gcc/fortran/trans-types.c:1124 0x7ada4c gfc_conv_expr_descriptor(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-array.c:7544 0x7b46cb gfc_conv_array_parameter(gfc_se*, gfc_expr*, bool, gfc_symbol const*, char const*, tree_node**) ../../gcc/fortran/trans-array.c:8110 0x7fa20c gfc_convert_array_to_string ../../gcc/fortran/trans-io.c:788 0x7fa20c set_string ../../gcc/fortran/trans-io.c:848 0x7fc1be build_dt ../../gcc/fortran/trans-io.c:1941 0x79fb37 trans_code ../../gcc/fortran/trans.c:2110 0x7c6054 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6893 0x74c876 translate_all_program_units ../../gcc/fortran/parse.c:6461 0x74c876 gfc_parse_file() ../../gcc/fortran/parse.c:6730 0x798bbf gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212