[Bug fortran/79676] [submodules] Compilation/linking error when module procedures PRIVATE

2017-04-01 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79676

Paul Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||pault at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #5 from Paul Thomas  ---
Fixed on trunk and 6-branch.

Thanks for the report

Paul

[Bug fortran/79676] [submodules] Compilation/linking error when module procedures PRIVATE

2017-04-01 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79676

--- Comment #4 from Paul Thomas  ---
Author: pault
Date: Sat Apr  1 09:35:52 2017
New Revision: 246631

URL: https://gcc.gnu.org/viewcvs?rev=246631=gcc=rev
Log:
2017-04-01  Paul Thomas  

Backport from trunk
PR fortran/79676
* module.c (mio_symbol_attribute): Remove reset of the flag
'no_module_procedures'.
(check_for_module_procedures): New function. Move declaration
of 'no_module_procedures' to above it.
(gfc_dump_module): Traverse namespace calling new function.

2017-04-01  Paul Thomas  

Backport from trunk
PR fortran/79676
* gfortran.dg/submodule_28.f08 : New test.


Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/submodule_28.f08
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/module.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug fortran/79676] [submodules] Compilation/linking error when module procedures PRIVATE

2017-03-18 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79676

--- Comment #3 from Paul Thomas  ---
Author: pault
Date: Sat Mar 18 12:38:02 2017
New Revision: 246256

URL: https://gcc.gnu.org/viewcvs?rev=246256=gcc=rev
Log:
2017-03-18  Paul Thomas  

PR fortran/79676
* module.c (mio_symbol_attribute): Remove reset of the flag
'no_module_procedures'.
(check_for_module_procedures): New function. Move declaration
of 'no_module_procedures' to above it.
(gfc_dump_module): Traverse namespace calling new function.

2017-03-18  Paul Thomas  

PR fortran/79676
* gfortran.dg/submodule_28.f08 : New test.

Added:
trunk/gcc/testsuite/gfortran.dg/submodule_28.f08
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/module.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/79676] [submodules] Compilation/linking error when module procedures PRIVATE

2017-02-27 Thread adam at aphirst dot karoo.co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79676

--- Comment #2 from Adam Hirst  ---
Could this be related? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846#c14

> Paul Thomas 2015-07-16 14:52:58 UTC
> OK - this compiles and runs if the PRIVATE statement is removed. As soon as I 
> return to the privacy issue, I will check that this testcase is OK.

[Bug fortran/79676] [submodules] Compilation/linking error when module procedures PRIVATE

2017-02-22 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79676

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-02-22
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed with gfortran 6.3 and trunk (7.0). Reduced test

module my_mod
  interface
module subroutine submod_test(x)
  real :: x
end subroutine
  end interface

  private ! this line seems to be the one causing the problems
  public routine1

contains

  subroutine routine1(x)
real :: x
call submod_test(x)
  end subroutine

end module

submodule (my_mod) my_submod
use my_mod
contains
module procedure submod_test
  print *, x
end procedure
end submodule