public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build
@ 2012-04-09 16:50 hjl.tools at gmail dot com
  2012-04-09 19:10 ` [Bug fortran/52916] " tkoenig at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2012-04-09 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52916
           Summary: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to
                    build
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: areg.melikadamyan@gmail.com


On Linux/x86-64, revision 186226 gave

gfortran  -O2 -ffast-math   -DSPEC_CPU_LINUX -DSPEC_CPU_CASE_FLAG
-DSPEC_CPU_LOGICAL_STRICT -frecord-marker=4       wrf_num_bytes_between.o
pack_utils.o module_driver_constants.fppized.o module_domain.fppized.o
module_integrate.fppized.o module_timing.fppized.o module_configure.fppized.o
module_tiles.fppized.o module_machine.fppized.o module_nesting.fppized.o
module_wrf_error.fppized.o module_state_description.fppized.o
module_sm.fppized.o module_io.fppized.o module_dm_stubs.fppized.o
module_quilt_outbuf_ops.fppized.o module_io_quilt.fppized.o module_bc.fppized.o
module_io_wrf.fppized.o module_date_time.fppized.o module_io_domain.fppized.o
module_bc_time_utilities.fppized.o module_model_constants.fppized.o
module_soil_pre.fppized.o module_bl_mrf.fppized.o module_sf_myjsfc.fppized.o
module_bl_myjpbl.fppized.o module_bl_ysu.fppized.o module_cu_bmj.fppized.o
module_mp_kessler.fppized.o module_mp_ncloud5.fppized.o module_ra_sw.fppized.o
module_sf_sfclay.fppized.o module_cu_kf.fppized.o module_cu_kfeta.fppized.o
module_mp_lin.fppized.o module_mp_wsm3.fppized.o module_mp_wsm5.fppized.o
module_mp_wsm6.fppized.o module_surface_driver.fppized.o module_cu_gd.fppized.o
module_sf_sfcdiags.fppized.o module_ra_gsfcsw.fppized.o
module_sf_slab.fppized.o module_sf_noahlsm.fppized.o module_sf_ruclsm.fppized.o
module_mp_ncloud3.fppized.o module_mp_etanew.fppized.o module_ra_rrtm.fppized.o
module_ra_gfdleta.fppized.o module_physics_init.fppized.o
module_physics_addtendc.fppized.o module_solvedebug_em.fppized.o
module_bc_em.fppized.o module_advect_em.fppized.o module_diffusion_em.fppized.o
module_small_step_em.fppized.o module_big_step_utilities_em.fppized.o
module_em.fppized.o module_init_utilities.fppized.o
module_optional_si_input.fppized.o ESMF_Alarm.fppized.o ESMF_Base.fppized.o
ESMF_BaseTime.fppized.o ESMF_Calendar.fppized.o ESMF_Clock.fppized.o
ESMF_Fraction.fppized.o ESMF_Mod.fppized.o ESMF_Time.fppized.o
ESMF_TimeInterval.fppized.o Meat.fppized.o wrf_shutdown.fppized.o
collect_on_comm.o mediation_integrate.fppized.o
mediation_feedback_domain.fppized.o mediation_force_domain.fppized.o
mediation_interp_domain.fppized.o mediation_wrfmain.fppized.o
wrf_auxhist1in.fppized.o wrf_auxhist1out.fppized.o wrf_auxhist2in.fppized.o
wrf_auxhist2out.fppized.o wrf_auxhist3in.fppized.o wrf_auxhist3out.fppized.o
wrf_auxhist4in.fppized.o wrf_auxhist4out.fppized.o wrf_auxhist5in.fppized.o
wrf_auxhist5out.fppized.o wrf_auxinput1in.fppized.o wrf_auxinput1out.fppized.o
wrf_auxinput2in.fppized.o wrf_auxinput2out.fppized.o wrf_auxinput3in.fppized.o
wrf_auxinput3out.fppized.o wrf_auxinput4in.fppized.o wrf_auxinput4out.fppized.o
wrf_auxinput5in.fppized.o wrf_auxinput5out.fppized.o wrf_bdyin.fppized.o
wrf_bdyout.fppized.o wrf_histin.fppized.o wrf_histout.fppized.o
wrf_inputin.fppized.o wrf_inputout.fppized.o wrf_restartin.fppized.o
wrf_restartout.fppized.o couple_or_uncouple_em.fppized.o
interp_domain_em.fppized.o interp_fcn.fppized.o nest_init_utils.fppized.o
set_timekeeping.fppized.o sint.fppized.o solve_interface.fppized.o
start_domain.fppized.o module_pbl_driver.fppized.o
module_radiation_driver.fppized.o module_cumulus_driver.fppized.o
module_microphysics_driver.fppized.o solve_em.fppized.o start_em.fppized.o
internal_header_util.fppized.o io_int.fppized.o init_modules_em.fppized.o
init_modules.fppized.o wrf_io.o field_routines.o wrf.fppized.o netcdf/attr.o
netcdf/dim.o netcdf/error.o netcdf/fort-attio.o netcdf/fort-control.o
netcdf/fort-dim.o netcdf/fort-genatt.o netcdf/fort-geninq.o
netcdf/fort-genvar.o netcdf/fort-lib.o netcdf/fort-misc.o
netcdf/fort-v2compat.o netcdf/fort-var1io.o netcdf/fort-varaio.o
netcdf/fort-vario.o netcdf/fort-varmio.o netcdf/fort-varsio.o netcdf/libvers.o
netcdf/nc.o netcdf/ncx.o netcdf/posixio.o netcdf/putget.o netcdf/string.o
netcdf/v1hpg.o netcdf/v2i.o netcdf/var.o netcdf/typeSizes.o netcdf/netcdf.o    
                -o wrf
module_integrate.fppized.o: In function `__module_integrate_MOD_integrate':
module_integrate.fppized.f90:(.text+0x83): undefined reference to
`__esmf_timemod_MOD_esmf_timelt'
module_integrate.fppized.f90:(.text+0x2c4): undefined reference to
`__esmf_timemod_MOD_esmf_timedec'
module_nesting.fppized.o: In function `__module_nesting_MOD_nests_to_open':
module_nesting.fppized.f90:(.text+0x3eb): undefined reference to
`__esmf_timemod_MOD_esmf_timele'
module_nesting.fppized.f90:(.text+0x40e): undefined reference to
`__esmf_timemod_MOD_esmf_timegt'
module_io_wrf.fppized.o: In function `output_wrf_':
module_io_wrf.fppized.f90:(.text+0x1bbf): undefined reference to
`__esmf_timemod_MOD_esmf_timeinc'
...

Revision 186209 is OK.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/52916] [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build
  2012-04-09 16:50 [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build hjl.tools at gmail dot com
@ 2012-04-09 19:10 ` tkoenig at gcc dot gnu.org
  2012-04-10 10:03 ` burnus at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-04-09 19:10 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-04-09
                 CC|                            |tkoenig at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-04-09 19:09:51 UTC ---
Reduced test case?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/52916] [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build
  2012-04-09 16:50 [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build hjl.tools at gmail dot com
  2012-04-09 19:10 ` [Bug fortran/52916] " tkoenig at gcc dot gnu.org
@ 2012-04-10 10:03 ` burnus at gcc dot gnu.org
  2012-04-10 10:29 ` burnus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-04-10 10:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
                 CC|                            |burnus at gcc dot gnu.org
   Target Milestone|---                         |4.8.0

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-10 10:02:13 UTC ---
That's probably due to my patch for PR 40973 / PR 52751 (Rev. 186223). That
patch marked  functions/subroutines  and  variables from MODULES as
TREE_PUBLIC() = 0, if they have the PRIVATE attribute and no C-binding name.

That will definitely fail if one accesses the procedures directly, e.g. from C
via
"__moduleName_MOD_subroutine ();". The question is whether 481.wrf does so
(probably not). However, I fail to see how it could otherwise encounter the
problem.

As I do not have access to SPEC CPU, I would be happy if someone could provide
more information. (Best would be a test case.) As a first step: Are the missing
symbols procedures or (global) variables? Or both?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/52916] [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build
  2012-04-09 16:50 [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build hjl.tools at gmail dot com
  2012-04-09 19:10 ` [Bug fortran/52916] " tkoenig at gcc dot gnu.org
  2012-04-10 10:03 ` burnus at gcc dot gnu.org
@ 2012-04-10 10:29 ` burnus at gcc dot gnu.org
  2012-04-11 19:12 ` burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-04-10 10:29 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/52916] [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build
  2012-04-09 16:50 [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2012-04-10 10:29 ` burnus at gcc dot gnu.org
@ 2012-04-11 19:12 ` burnus at gcc dot gnu.org
  2012-04-12 13:57 ` izamyatin at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-04-11 19:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-11 19:11:46 UTC ---
Submitted patch: http://gcc.gnu.org/ml/fortran/2012-04/msg00055.html


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/52916] [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build
  2012-04-09 16:50 [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2012-04-11 19:12 ` burnus at gcc dot gnu.org
@ 2012-04-12 13:57 ` izamyatin at gmail dot com
  2012-04-15  5:55 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: izamyatin at gmail dot com @ 2012-04-12 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Igor Zamyatin <izamyatin at gmail dot com> 2012-04-12 13:55:54 UTC ---
With this patch 481.wrf is ok


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/52916] [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build
  2012-04-09 16:50 [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2012-04-12 13:57 ` izamyatin at gmail dot com
@ 2012-04-15  5:55 ` burnus at gcc dot gnu.org
  2012-04-16 21:39 ` burnus at gcc dot gnu.org
  2012-04-18  8:21 ` burnus at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-04-15  5:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-15 05:52:58 UTC ---
Author: burnus
Date: Sun Apr 15 05:52:51 2012
New Revision: 186464

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186464
Log:
2012-04-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52916
        PR fortran/40973
        * gfortran.h (symbol_attribute): Add public_used.
        * interface.c (check_sym_interfaces, check_uop_interfaces,
        gfc_check_interfaces): Set it.
        * resolve.c (resolve_typebound_procedure): Ditto.
        * trans-decl.c (build_function_decl): Use it.

2012-04-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52916
        PR fortran/40973
        * gfortran.dg/public_private_module_3.f90: New.
        * gfortran.dg/public_private_module_4.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/public_private_module_3.f90
    trunk/gcc/testsuite/gfortran.dg/public_private_module_4.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/52916] [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build
  2012-04-09 16:50 [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2012-04-15  5:55 ` burnus at gcc dot gnu.org
@ 2012-04-16 21:39 ` burnus at gcc dot gnu.org
  2012-04-18  8:21 ` burnus at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-04-16 21:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-16 21:38:53 UTC ---
Author: burnus
Date: Mon Apr 16 21:38:49 2012
New Revision: 186506

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186506
Log:
2012-04-16  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52916
        * gfortran.dg/public_private_module_3.f90: Use dg-additional-sources
        to include public_private_module_4.f90.
        * gfortran.dg/public_private_module_4.f90: Skip this test on all
        targets


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/public_private_module_3.f90
    trunk/gcc/testsuite/gfortran.dg/public_private_module_4.f90


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/52916] [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build
  2012-04-09 16:50 [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2012-04-16 21:39 ` burnus at gcc dot gnu.org
@ 2012-04-18  8:21 ` burnus at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-04-18  8:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-18 08:16:33 UTC ---
FIXED on the trunk.

Thanks for the report and the patience.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-04-18  8:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-09 16:50 [Bug fortran/52916] New: [4.8 Regression] 481.wrf in SPEC CPU 2006 failed to build hjl.tools at gmail dot com
2012-04-09 19:10 ` [Bug fortran/52916] " tkoenig at gcc dot gnu.org
2012-04-10 10:03 ` burnus at gcc dot gnu.org
2012-04-10 10:29 ` burnus at gcc dot gnu.org
2012-04-11 19:12 ` burnus at gcc dot gnu.org
2012-04-12 13:57 ` izamyatin at gmail dot com
2012-04-15  5:55 ` burnus at gcc dot gnu.org
2012-04-16 21:39 ` burnus at gcc dot gnu.org
2012-04-18  8:21 ` burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).