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/30922] IMPORT fails for same symbol in multiple interface bodies of same interface block



------- Comment #3 from burnus at gcc dot gnu dot org  2007-03-12 08:50 -------
Created an attachment (id=13193)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13193&action=view)
Patch draft (by Paul Thomas)

Notes by Paul:
----------------
(i) gfc_find_symbol searches via proc_name->ns to overcome standard
problem with interfaces in enclosed procedures.
(ii) Add field imported to gfc_symtree
(iii) Set it when a symbol is imported
(iv)resolve.c 5658 to use imported to stop false error for individually
imported symbols.
----------------

Note, it does not fix the problem of comment 1 (which was found later).

It causes some regressions (filelist below) with such errors:
gfortran.fortran-torture/execute/der_io.f90:55.20:
    subroutine foo(t)
                   1
gfortran.fortran-torture/execute/der_io.f90:5.15:

  type xyz_type
              2
Error: The type xyz_type cannot be host associated at (1) because it is
blocked by an incompatible object of the same name at (2)

Files:
gfortran.dg/automatic_default_init_1.f90
gfortran.dg/char_result_11.f90
gfortran.dg/char_result_5.f90
gfortran.dg/char_result_6.f90
gfortran.dg/default_initialization_2.f90
gfortran.dg/dependency_19.f90
gfortran.dg/der_charlen_1.f90
gfortran.dg/der_io_2.f90
gfortran.dg/der_io_3.f90
gfortran.dg/der_pointer_3.f90
[...]


-- 


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


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