$ cat a.f90 module modA implicit none save private type, public :: typA integer :: i end type typA type, public :: atom type(typA), pointer :: ofTypA(:,:) end type atom end module modA !!! re-name and re-export typA as typB: module modB use modA, only: typB =typA implicit none save private public typB end module modB !!! mixed used of typA and typeB: module modC use modB implicit none save private contains subroutine buggy(a) use modA, only: atom ! use modB, only: typB ! use modA, only: typA implicit none type(atom),intent(inout) :: a target :: a ! end of interface type(typB), pointer :: ofTypB(:,:) ! type(typA), pointer :: ofTypB(:,:) integer :: i,j,k ofTypB =a%ofTypA a%ofTypA(i,j) = ofTypB(k,j) end subroutine buggy end module modC $ gfortran -c a.f90 a.f90: In function buggy: a.f90:47: internal compiler error: in fold_convert, at fold-const.c:2098 The backtrace is: Breakpoint 1, fancy_abort (file=0x85d6e64 "", line=2098, function=0x85d6dda "fold_convert") at 641 { (gdb) where #0 fancy_abort (file=0x85d6e64 "", line=2098, function=0x85d6dda "fold_convert") at #1 0x082240be in fold_convert (type=0xb7be9508, arg=0xb7b960dc) at #2 0x080beb27 in gfc_trans_scalar_assign (lse=0xbfc20674, rse=0xbfc2064c, type=BT_DERIVED) at #3 0x080c41ec in gfc_trans_assignment (expr1=0x873ffb0, expr2=0x8740af8) at #4 0x080c4449 in gfc_trans_assign (code=0x8740d50) at #5 0x080aa814 in gfc_trans_code (code=0x8740d50) at #6 0x080bc8de in gfc_generate_function_code (ns=0x873f9d8) at #7 0x080a9f48 in gfc_generate_module_code (ns=0x872a520) at #8 0x08088b20 in gfc_parse_file () at #9 0x080a991d in gfc_be_parse_file (set_yydebug=0) at #10 0x0839d94a in toplev_main (argc=13, argv=0xbfc208f4) at #11 0x080dd56f in main (argc=-1212544056, argv=0x0) at ///trunk/gcc/main.c:35
No.1 | | 228 bytes | |
-- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added Status|UNCNFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-08-04 13:06:02 date| |
No.2 | | 156 bytes | |
Comment #1 from pault at gcc dot gnu dot org 2006-08-08 19:45 A patch is on its way to the list, just as soon as it has finished regtesting. Paul
No.3 | | 3898 bytes | |
Comment #2 from pault at gcc dot gnu dot org 2006-08-20 05:46 Subject: Bug 28601
Author: pault Date: Sun Aug 20 05:45:43 2006 New Revision: 116268
URL: Log: 2006-08-20 Paul Thomas <pault (AT) gcc (DOT) gnu.org>
PR fortran/28601 PR fortran/28630 * gfortran.h : Eliminate gfc_dt_list structure and reference to it in gfc_namespace. * resolve.c (resolve_fl_derived): Remove the building of the list of derived types for the current namespace. * symbol.c (find_renamed_type): New function to find renamed derived types by symbol name rather than symtree name. (gfc_use_derived): Search parent namespace for identical derived type and use it, even if local version is complete, except in interface bodies. Ensure that renamed derived types are found by call to find_renamed_type. Recurse for derived type components. (gfc_free_dt_list): Remove. (gfc_free_namespace): Remove call to previous. * trans-types.c (copy_dt_decls_ifequal): Remove. (gfc_get_derived_type): Remove all the paraphenalia for association of derived types, including calls to previous. * match.c (gfc_match_allocate): Call gfc_use_derived to associate any derived types that are being allocated.
PR fortran/20886 * resolve.c (resolve_actual_arglist): The passing of a generic procedure name as an actual argument is an error.
PR fortran/28735 * resolve.c (resolve_variable): Check for a symtree before resolving references.
PR fortran/28762 * primary.c (match_variable): Return MATCH_N if the symbol is that of the program.
PR fortran/28425 * trans-expr.c (gfc_trans_subcomponent_assign): Translate derived type component expressions other than another derived type constructor.
PR fortran/28496 * expr.c (find_array_section): Correct errors in the handling of a missing start value for the index triplet in an array reference.
PR fortran/18111 * trans-decl.c (gfc_build_dummy_array_decl): Before resetting reference to backend_decl, set it DECL_ARTIFICIAL. (gfc_get_symbol_decl): Likewise for original dummy decl, when a copy is made of an array. (create_function_arglist): Likewise for the _entry paramter in entry_masters. (build_entry_thunks): Likewise for dummies in entry thunks.
PR fortran/28600 * trans-decl.c (gfc_get_symbol_decl): Ensure that the DECL_CNTEXT of the length of a character dummy is the same as that of the symbol declaration.
PR fortran/28771 * decl.c (add_init_expr_to_sym): Remove setting of charlen for an initializer of an assumed charlen variable.
PR fortran/28660 * trans-decl.c (generate_expr_decls): New function. (): New function. (generate_local_decl): Call previous if not either a dummy or a declaration in an entry master.
2006-08-20 Paul Thomas <pault (AT) gcc (DOT) gnu.org>
PR fortran/28630 * gfortran.dg/used_types_2.f90: New test.
PR fortran/28601 * gfortran.dg/used_types_3.f90: New test.
Comment #3 from pault at gcc dot gnu dot org 2006-08-20 08:20 Subject: Bug 28601
Author: pault Date: Sun Aug 20 08:20:26 2006 New Revision: 116269
URL: Log: 2006-08-20 Paul Thomas <pault (AT) gcc (DOT) gnu.org>
PR fortran/28601 PR fortran/28630 * gfortran.h : Eliminate gfc_dt_list structure and reference to it in gfc_namespace. * resolve.c (resolve_fl_derived): Remove the building of the list of derived types for the current namespace. * symbol.c (find_renamed_type): New function to find renamed derived types by symbol name rather than symtree name. (gfc_use_derived): Search parent namespace for identical derived type and use it, even if local version is complete, except in interface bodies. Ensure that renamed derived types are found by call to find_renamed_type. Recurse for derived type components. (gfc_free_dt_list): Remove. (gfc_free_namespace): Remove call to previous. * trans-types.c (copy_dt_decls_ifequal): Remove. (gfc_get_derived_type): Remove all the paraphenalia for association of derived types, including calls to previous. * match.c (gfc_match_allocate): Call gfc_use_derived to associate any derived types that are being allocated.
PR fortran/20886 * resolve.c (resolve_actual_arglist): The passing of a generic procedure name as an actual argument is an error.
PR fortran/28735 * resolve.c (resolve_variable): Check for a symtree before resolving references.
PR fortran/28762 * primary.c (match_variable): Return MATCH_N if the symbol is that of the program.
PR fortran/28425 * trans-expr.c (gfc_trans_subcomponent_assign): Translate derived type component expressions other than another derived type constructor.
PR fortran/28496 * expr.c (find_array_section): Correct errors in the handling of a missing start value for the index triplet in an array reference.
PR fortran/18111 * trans-decl.c (gfc_build_dummy_array_decl): Before resetting reference to backend_decl, set it DECL_ARTIFICIAL. (gfc_get_symbol_decl): Likewise for original dummy decl, when a copy is made of an array. (create_function_arglist): Likewise for the _entry paramter in entry_masters. (build_entry_thunks): Likewise for dummies in entry thunks.
PR fortran/28771 * decl.c (add_init_expr_to_sym): Remove setting of charlen for an initializer of an assumed charlen variable.
PR fortran/28660 * trans-decl.c (generate_expr_decls): New function. (): New function. (generate_local_decl): Call previous if not either a dummy or a declaration in an entry master.
2006-08-20 Paul Thomas <pault (AT) gcc (DOT) gnu.org>
PR fortran/28630 * gfortran.dg/used_types_2.f90: New test.
PR fortran/28601 * gfortran.dg/used_types_3.f90: New test.
PR fortran/20886 * New test.
PR fortran/28735 * New test.
PR fortran/28762 * New test.
PR fortran/28425 * New test.
PR fortran/28496 * New test.
PR fortran/18111 * New test.
PR fortran/28771 * New test.
PR fortran/28660 * New test.
Added:
Modified:
No.5 | | 100 bytes | |
Comment #4 from pault at gcc dot gnu dot org 2006-08-20 17:29 Fixed on trunk and 4.1 Paul