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/52916] [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-10 10:27:37 UTC ---
Found the information I was looking for at
http://www.cesm.ucar.edu/models/cesm1.0/cesm/cesmBbrowser/html_code/esmf_wrf_timemgr/ESMF_TimeMod.F90.html


The problem is that the PRIVATE module procedure is used as specific procedure
for an operator (which is PUBLIC).

Thus, one cannot set the TREE_PUBLIC() = 0 for PRIVATE procedures, if
(a) the generic procedure / user-defined operator/assignment is not also
PRIVATE
(b) a procedure is used as type-bound procedure in a nonabstract nonprivate
TYPE declaration.
[(c) if the (sub)module has a submodule. (Note: Currently, no submodules are
supported.)]

The simplest might be to add another attribute - and set it during resolution.


Workaround: Undo the "build_function_decl" part of the commit Rev. 186223 - or
revert the complete commit.


Test case, which will produce at link time with any optimization level:
  undefined reference to `__m_MOD_bar'

! ----- FILE 1 ----
module m
  interface gen
    module procedure bar
  end interface gen
  private :: bar
contains
  subroutine bar()
    print *, "bar"
  end subroutine bar
end module m

! ----- FILE 2 ----
use m
call gen()
end


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