https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69409
Bug ID: 69409 Summary: Internal compiler error with -fcheck=all Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mrestelli at gmail dot com Target Milestone: --- Compiling the attached code with the latest trunk version and using -fcheck=all produces an internal compiler error: module m implicit none private type :: t_a real, allocatable :: ax(:) end type t_a contains pure function new_a(x) result(a) type(t_a) :: a real, intent(in) :: x allocate( a%ax(1) ) a%ax = x end function new_a end module m $ gfortran -fcheck=all -c m.f90 m.f90:18:0: a%ax = x internal compiler error: in wide_int_to_tree, bei tree.c:1488 0xc62e93 wide_int_to_tree(tree_node*, generic_wide_int<wide_int_ref_storage<false> > const&) .././../gcc-trunk-source/gcc/tree.c:1488 0xc62f79 build_int_cst(tree_node*, long) .././../gcc-trunk-source/gcc/tree.c:1296 0x6b788d gfc_trans_assignment_1 .././../gcc-trunk-source/gcc/fortran/trans-expr.c:9305 0x681571 trans_code .././../gcc-trunk-source/gcc/fortran/trans.c:1680 0x6a485c gfc_generate_function_code(gfc_namespace*) .././../gcc-trunk-source/gcc/fortran/trans-decl.c:6107 0x684861 gfc_generate_module_code(gfc_namespace*) .././../gcc-trunk-source/gcc/fortran/trans.c:2058 0x63de9d translate_all_program_units .././../gcc-trunk-source/gcc/fortran/parse.c:5599 0x63de9d gfc_parse_file() .././../gcc-trunk-source/gcc/fortran/parse.c:5818 0x67e685 gfc_be_parse_file .././../gcc-trunk-source/gcc/fortran/f95-lang.c:201 $ gfortran --version GNU Fortran (GCC) 6.0.0 20160120 (experimental) (version 4.9.3 is fine; in fact, I think this is a regression interoduced recently, even if I can not say exactly when).