https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67804

G. Steinmetz <gs...@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gs...@t-online.de

--- Comment #2 from G. Steinmetz <gs...@t-online.de> ---
Update, backtrace :

$ cat z4.f90
program p
   type t
      character :: c
   end type
   type(t) :: z
   data z /t(4)/
end


$ gfortran-8-20180121 -c z4.f90
z4.f90:1:0:

 program p

internal compiler error: in gfc_conv_string_init, at fortran/trans-const.c:149
0x76267a gfc_conv_string_init(tree_node*, gfc_expr*)
        ../../gcc/fortran/trans-const.c:149
0x780f6f gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool,
bool)
        ../../gcc/fortran/trans-expr.c:6899
0x7814d5 gfc_conv_structure(gfc_se*, gfc_expr*, int)
        ../../gcc/fortran/trans-expr.c:7762
0x780fa1 gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool,
bool)
        ../../gcc/fortran/trans-expr.c:6892
0x76b152 gfc_get_symbol_decl(gfc_symbol*)
        ../../gcc/fortran/trans-decl.c:1822
0x76e027 generate_local_decl
        ../../gcc/fortran/trans-decl.c:5539
0x732bcb do_traverse_symtree
        ../../gcc/fortran/symbol.c:4157
0x76ec82 generate_local_vars
        ../../gcc/fortran/trans-decl.c:5739
0x76ec82 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6386
0x6fecd0 translate_all_program_units
        ../../gcc/fortran/parse.c:6103
0x6fecd0 gfc_parse_file()
        ../../gcc/fortran/parse.c:6306
0x74520f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204

---

While initializing directly :

$ cat z5.f90
program p
   type t
      character :: c
   end type
   type(t) :: z = t(4)
end


$ gfortran-8-20180121 -c z5.f90
z5.f90:5:20:

    type(t) :: z = t(4)
                    1
Error: Can't convert INTEGER(4) to CHARACTER(1) at (1)

Reply via email to