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

koenigni at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |koenigni at gcc dot gnu.org

--- Comment #3 from koenigni at gcc dot gnu.org ---
Some more fun with characters & data :)

gcc@dcm-linux:~/boi/new> cat z3.f90
subroutine s()
    implicit none
    type t
        character(:):: c
    end type
    type(t):: tp
    data tp%c /'a'/
end subroutine
gcc@dcm-linux:~/boi/new> gfortran z3.f90
z3.f90:4:24:

         character(:):: c
                        1
Error: Character component ‘c’ of ‘t’ at (1) with deferred length must be a
POINTER or ALLOCATABLE
f951: internal compiler error: Segmentation fault
0xbdb69f crash_signal
        ../../trunk/gcc/toplev.c:337
0x5f97bb gfc_constructor_append_expr(splay_tree_s**, gfc_expr*, locus*)
        ../../trunk/gcc/fortran/constructor.c:135
0x5fb4ec formalize_structure_cons
        ../../trunk/gcc/fortran/data.c:618
0x5fb4ec formalize_init_expr
        ../../trunk/gcc/fortran/data.c:655
0x69a182 do_traverse_symtree
        ../../trunk/gcc/fortran/symbol.c:4009
0x675793 resolve_types
        ../../trunk/gcc/fortran/resolve.c:16050
0x679d8c gfc_resolve(gfc_namespace*)
        ../../trunk/gcc/fortran/resolve.c:16135
0x669004 resolve_all_program_units
        ../../trunk/gcc/fortran/parse.c:6013
0x669004 gfc_parse_file()
        ../../trunk/gcc/fortran/parse.c:6260
0x6acb4f gfc_be_parse_file
        ../../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.
gcc@dcm-linux:~/boi/new> cat z4.f90
subroutine s()
    implicit none
    type t
        character(:), allocatable :: c
    end type
    type(t):: tp
    data tp%c /'a'/
end subroutine
gcc@dcm-linux:~/boi/new> gfortran z4.f90
z4.f90:1:0:

 subroutine s()

internal compiler error: Segmentation fault
0xbdb69f crash_signal
        ../../trunk/gcc/toplev.c:337
0x6f94bc gfc_conv_structure(gfc_se*, gfc_expr*, int)
        ../../trunk/gcc/fortran/trans-expr.c:7658
0x6f8f51 gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool,
bool)
        ../../trunk/gcc/fortran/trans-expr.c:6828
0x6dd780 gfc_get_symbol_decl(gfc_symbol*)
        ../../trunk/gcc/fortran/trans-decl.c:1800
0x6e0ee7 generate_local_decl
        ../../trunk/gcc/fortran/trans-decl.c:5403
0x69a182 do_traverse_symtree
        ../../trunk/gcc/fortran/symbol.c:4009
0x6e1d82 generate_local_vars
        ../../trunk/gcc/fortran/trans-decl.c:5603
0x6e1d82 gfc_generate_function_code(gfc_namespace*)
        ../../trunk/gcc/fortran/trans-decl.c:6267
0x6691a6 translate_all_program_units
        ../../trunk/gcc/fortran/parse.c:6074
0x6691a6 gfc_parse_file()
        ../../trunk/gcc/fortran/parse.c:6274
0x6acb4f gfc_be_parse_file
        ../../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.
gcc@dcm-linux:~/boi/new> cat z5.f90
character(:), pointer :: a
data a /'foo'/
end
gcc@dcm-linux:~/boi/new> gfortran z5.f90
f951: internal compiler error: Segmentation fault
0xbdb69f crash_signal
        ../../trunk/gcc/toplev.c:337
0x682a87 check_data_variable
        ../../trunk/gcc/fortran/resolve.c:14951
0x682a87 traverse_data_var
        ../../trunk/gcc/fortran/resolve.c:15187
0x675751 resolve_data
        ../../trunk/gcc/fortran/resolve.c:15242
0x675751 resolve_types
        ../../trunk/gcc/fortran/resolve.c:16047
0x679d8c gfc_resolve(gfc_namespace*)
        ../../trunk/gcc/fortran/resolve.c:16135
0x669004 resolve_all_program_units
        ../../trunk/gcc/fortran/parse.c:6013
0x669004 gfc_parse_file()
        ../../trunk/gcc/fortran/parse.c:6260
0x6acb4f gfc_be_parse_file
        ../../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.

Reply via email to