This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/22244] dimension information is lost for multi-dimension array



------- Comment #13 from jakub at gcc dot gnu dot org  2007-12-09 17:08 -------
Subject: Bug 22244

Author: jakub
Date: Sun Dec  9 17:08:06 2007
New Revision: 130724

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130724
Log:
        PR fortran/22244
        * langhooks-def.h (LANG_HOOKS_GET_ARRAY_DESCR_INFO): Define.
        (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add it.
        * langhooks.h (struct array_descr_info): Forward declaration.
        (struct lang_hooks_for_types): Add get_array_descr_info field.
        * dwarf2.h (DW_AT_bit_stride, DW_AT_byte_stride): New.
        (DW_AT_stride_size, DW_AT_stride): Keep around for Dwarf2
        compatibility.
        * dwarf2out.h (struct array_descr_info): New type.
        * dwarf2out.c (dwarf_attr_name): Rename DW_AT_stride to
        DW_AT_byte_stride and DW_AT_stride_size to DW_AT_bit_size.
        (descr_info_loc, add_descr_info_field, gen_descr_array_type_die):
        New functions.
        (gen_type_die_with_usage): Call lang_hooks.types.get_array_descr_info
        and gen_descr_array_type_die.

        * trans.h (struct array_descr_info): Forward declaration.
        (gfc_get_array_descr_info): New prototype.
        (enum gfc_array_kind): New type.
        (struct lang_type): Add akind field.
        (GFC_TYPE_ARRAY_AKIND): Define.
        * trans-types.c: Include dwarf2out.h.
        (gfc_build_array_type): Add akind argument.  Adjust
        gfc_get_array_type_bounds call.
        (gfc_get_nodesc_array_type): Include proper debug info even for
        assumed-size arrays.
        (gfc_get_array_type_bounds): Add akind argument, set
        GFC_TYPE_ARRAY_AKIND to it.
        (gfc_sym_type, gfc_get_derived_type): Adjust gfc_build_array_type
        callers.
        (gfc_get_array_descr_info): New function.
        * trans-array.c (gfc_trans_create_temp_array,
        gfc_conv_expr_descriptor): Adjust gfc_get_array_type_bounds
        callers.
        * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Likewise.
        * trans-types.h (gfc_get_array_type_bounds): Adjust prototype.
        * Make-lang.in (fortran/trans-types.o): Depend on dwarf2out.h.
        * f95-lang.c (LANG_HOOKS_GET_ARRAY_DESCR_INFO): Define.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2.h
    trunk/gcc/dwarf2out.c
    trunk/gcc/dwarf2out.h
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/Make-lang.in
    trunk/gcc/fortran/f95-lang.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/fortran/trans-types.h
    trunk/gcc/fortran/trans.h
    trunk/gcc/langhooks-def.h
    trunk/gcc/langhooks.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22244


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]