public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52846] New: [F2008] Support submodules
@ 2012-04-03 15:00 burnus at gcc dot gnu.org
  2014-12-21 15:31 ` [Bug fortran/52846] " dominiq at lps dot ens.fr
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-04-03 15:00 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52846
           Summary: [F2008] Support submodules
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
            Blocks: 39627


Fortran 2008 added submodules support.

That's a tracker bug with the main intention to add a link to the following
bugs. Those contain a change which won't work with submodules. Thus, some
special submodule check has to be inserted for PR 52751 and PR 40973.


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
@ 2014-12-21 15:31 ` dominiq at lps dot ens.fr
  2015-06-14 19:46 ` pault at gcc dot gnu.org
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-12-21 15:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-12-21
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
What is the purpose of this PR? To remind that submodules are not yet supported
and/or that the commits for PR 52751 and PR 40973 will have to be updated when
submodules will be supported?

In the latter case could you elaborate?


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
  2014-12-21 15:31 ` [Bug fortran/52846] " dominiq at lps dot ens.fr
@ 2015-06-14 19:46 ` pault at gcc dot gnu.org
  2015-06-14 19:47 ` pault at gcc dot gnu.org
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-06-14 19:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |pault at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |pault at gcc dot gnu.org

--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> ---
Dear Dominique and Tobias,

Whatever is the purpose of this PR, I will use it to hang my hat on :-) I have
a submodule patch nearly ready to go.

My plan is to submit next Saturday.

Cheers

Paul


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
  2014-12-21 15:31 ` [Bug fortran/52846] " dominiq at lps dot ens.fr
  2015-06-14 19:46 ` pault at gcc dot gnu.org
@ 2015-06-14 19:47 ` pault at gcc dot gnu.org
  2015-06-14 19:48 ` pault at gcc dot gnu.org
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-06-14 19:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 35779
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35779&action=edit
draft patch


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-06-14 19:47 ` pault at gcc dot gnu.org
@ 2015-06-14 19:48 ` pault at gcc dot gnu.org
  2015-07-02 20:40 ` pault at gcc dot gnu.org
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-06-14 19:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
Testcase:

! Test vehicle for submodules
! 14th June 2015
!
! Paul Thomas - check1406b.diff applies
!
! FIXED OR MOSTLY FIXED:
! Access in submodules to PROCEDURE COMPONENTS - FIXED 06/06/2015
! MODULE FUNCTIONS - partially FIXED 10/06/15 - syntax errors give difficult to
understand messages
! Salvatore's submodbug fixed 10/06/15 - module variable must remain use
associated
! Name mangling of MODULE PROCEDUREs - FIXED 13/06
! Parsing of SUBMODULE (module:parent_submodule:.....) - already worked(!)
tested 14/06
! Checking characteristics between interface and submodule declaration - FIXED
14/06
!
! TODOs:
! Clean up and comment all the new code (Partially done 14/06)
! Prepare testcases for testsuite
! Constraints as delineated in N1602.pdf or F2008 standard (will have to check
what is left!)
! Restricting output of .mod file from submodules to local symbols, etc. only
(not essential)
! Prepare ChangeLogs
! Submit :-)
!
 module foo_interface
   implicit none

   type foo
     character(len=15) :: greeting = "Hello, world!  "
   contains
     procedure :: greet => say_hello
     procedure :: farewell => bye
   end type foo

   interface
     module subroutine say_hello(this)
       import foo
       class(foo), intent(in) :: this
     end subroutine
     module subroutine bye(this)
       import foo
       class(foo), intent(in) :: this
     end subroutine
     module function realf (arg) result (res)
       real :: arg, res
     end function
     integer module function intf (arg)
       integer :: arg
     end function
     real module function realg (arg)
       real :: arg
     end function
     integer module function intg (arg)
       integer :: arg
     end function
   end interface
 contains
   subroutine smurf
     class(foo), allocatable :: this
     allocate (this)
     print *, "say_hello from SMURF --->"
! Test that say_hello is effectively host associated
     call say_hello (this)
   end subroutine
 end module

!_________________________________________________________________________________!
  SUBMODULE (foo_interface) foo_interface_son
!
  contains
! Test module procedure with conventional specification part for dummies
     module subroutine say_hello(this)
       class(foo), intent(in) :: this
       class(foo), allocatable :: that
       allocate (that, source = this)
! Test that components of foo are accessible
       print *, "(say_hello)", that%greeting
!       call this%farewell         ! NOTE WELL: This compiles and causes a
crash in run-time
!                                               due to recursion through the
call to this procedure from
!                                               say hello.
     end subroutine
     module function realf (arg) result (res)
       real :: arg, res
       res = 2*arg
     end function
  end SUBMODULE foo_interface_son

!_________________________________________________________________________________!
! Check that multiple generations of submodules are OK
  SUBMODULE (foo_interface:foo_interface_son) foo_interface_grandson
!
  contains
     integer module function intf (arg)
       integer :: arg
       intf = 2*arg
     end function
  end SUBMODULE foo_interface_grandson

!_________________________________________________________________________________!
  SUBMODULE (foo_interface) foo_interface_daughter
!
  contains
! Test module procedure with abbreviated declaration and no specification of
dummies
     module procedure bye
! Verify the derived type foo is accessible - had problems with this because
if_source != IFSRC_DECL
       class(foo), allocatable :: that
       print *, "(bye) ", this%greeting
       print *, "say_hello from BYE --->"
       call say_hello (this)
       allocate (that, source = this)
! Test that components of foo are accessible
       print *, "(bye)", that%greeting
       print *, "call that%greet from BYE --->"
       call that%greet
     end subroutine
     module procedure intg
       intg = 3*arg
     end function
     module procedure realg
       realg = 3*arg
     end function
  end SUBMODULE foo_interface_daughter

!_________________________________________________________________________________!
 program try
   use foo_interface
   implicit none
   type(foo) :: bar
   call bar%greet ! typebound call

!   Unnecessary tests at present
!   bar%greeting = "Goodbye, world!"
!   call bar%greet ! typebound call with changed message

   print *, "say_hello from TRY --->"
   call say_hello(bar) ! Checks use association of 'say_hello'
   call bye(bar) ! Checks use association in another submodule
   call smurf ! Checks host association of 'say_hello'
   bar%greeting = "farewell     "
   call bar%farewell
   print *, realf(2.0) ! Check module procedure with explicit result
   print *, intf(2)    ! ditto
   print *, realg(3.0) ! Check module procedure with function declaration
result
   print *, intg(3)    ! ditto
 end program
!_________________________________________________________________________________!


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-06-14 19:48 ` pault at gcc dot gnu.org
@ 2015-07-02 20:40 ` pault at gcc dot gnu.org
  2015-07-03 19:00 ` pault at gcc dot gnu.org
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-02 20:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Thu Jul  2 20:39:56 2015
New Revision: 225354

URL: https://gcc.gnu.org/viewcvs?rev=225354&root=gcc&view=rev
Log:
2015-07-02  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (get_proc_name): Make a partially populated interface
        symbol to carry the characteristics of a module procedure and
        its result.
        (variable_decl): Declarations of dummies or results in the
        abreviated form of module procedure is an error.
        (gfc_match_import): IMPORT is not permitted in the interface
        declaration of module procedures.
        (match_attr_spec): Submodule variables have implicit save
        attribute for F2008 onwards.
        (gfc_match_prefix): Add 'module' as the a prefix and set the
        module_procedure attribute.
        (gfc_match_formal_arglist): For a module procedure keep the
        interface formal_arglist from the interface, match new the
        formal arguments and then compare the number and names of each.
        (gfc_match_procedure): Add case COMP_SUBMODULE.
        (gfc_match_function_decl, gfc_match_subroutine_decl): Set the
        module_procedure attribute.
        (gfc_match_entry, gfc_match_end):  Add case COMP_SUBMODULE. If
        attr abr_modproc_decl is set, switch the message accordingly
        for subroutines and functions.
        (gfc_match_submod_proc): New function to match the abbreviated
        style of submodule declaration.
        * gfortran.h : Add ST_SUBMODULE and ST_END_SUBMODULE. Add the
        attribute bits 'used_in_submodule' and 'module_procedure'. Add
        the bit field 'abr_modproc_decl' to gfc_symbol. Add prototypes
        for 'gfc_copy_dummy_sym', 'gfc_check_dummy_characteristics' and
        'gfc_check_result_characteristics'.
        * interface.c : Add the prefix 'gfc_' to the names of functions
        'check_dummy(result)_characteristics' and all their references.
        * match.h : Add prototype for 'gfc_match_submod_proc' and
        'gfc_match_submodule'.
        (check_sym_interfaces): A module procedure is not an error in
        a module procedure statment in a generic interface.
        * module.c (gfc_match_submodule): New function. Add handling
        for the 'module_procedure' attribute bit.
        (gfc_use_module): Make sure that a submodule cannot use itself.
        * parse.c (decode_statement): Set attr has_'import_set' for
        the interface declaration of module procedures. Handle a match
        occurring in 'gfc_match_submod_proc' and a match for
        'submodule'.
        (gfc_enclosing_unit): Include the state COMP_SUBMODULE.
        (gfc_ascii_statement): Add END SUBMODULE.
        (accept_statement): Add ST_SUBMODULE.
        (parse_spec): Disallow statement functions in a submodule
        specification part.
        (parse_contained): Add ST_END_SUBMODULE and COMP_SUBMODULE
        twice each.
        (get_modproc_result): Copy the result symbol of the interface.
        (parse_progunit): Call it.
        (set_syms_host_assoc): Make symbols from the ancestor module
        and submodules use associated, as required by the standard and
        set all private components public. Module procedures 'external'
        attribute bit is reset and the 'used_in_submodule' bit is set.
        (parse_module): If this is a submodule, use the ancestor module
        and submodules. Traverse the namespace, calling
        'set_syms_host_assoc'. Add ST_END_SUBMODULE and COMP_SUBMODULE.
        * parse.h : Add COMP_SUBMODULE.
        * primary.c (match_variable): Add COMP_SUBMODULE.
        * resolve.c (compare_fsyms): New function to compare the dummy
        characteristics of a module procedure with its interface.
        (resolve_fl_procedure): Compare the procedure, result and dummy
        characteristics of a module_procedure with its interface, using
        'compare_fsyms' for the dummy arguments.
        * symbol.c (gfc_add_procedure): Suppress the check for existing
        procedures in the case of a module procedure.
        (gfc_add_explicit_interface): Skip checks that must fail for
        module procedures.
        (gfc_add_type): Allow a new type to be added to module
        procedures, their results or their dummy arguments.
        (gfc_copy_dummy_sym): New function to generate new dummy args
        and copy the characteristics from the interface.
        * trans-decl.c (gfc_sym_mangled_function_id): Module procedures
        must always have their names mangled as if they are symbols
        coming from a declaration in a module.
        (gfc_get_symbol_decl): Add 'used_in_submodule' to the assert.
        (gfc_finish_var_decl): Symbols with the 'used_in_submodule' bit
        set are set DECL_EXTERNAL as if they were use associated.

2015-07-02  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * gfortran.dg/submodule_1.f90: New test
        * gfortran.dg/submodule_2.f90: New test
        * gfortran.dg/submodule_3.f90: New test
        * gfortran.dg/submodule_4.f90: New test
        * gfortran.dg/submodule_5.f90: New test
        * gfortran.dg/submodule_6.f90: New test
        * gfortran.dg/submodule_7.f90: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_1.f90
    trunk/gcc/testsuite/gfortran.dg/submodule_2.f90
    trunk/gcc/testsuite/gfortran.dg/submodule_3.f90
    trunk/gcc/testsuite/gfortran.dg/submodule_4.f90
    trunk/gcc/testsuite/gfortran.dg/submodule_5.f90
    trunk/gcc/testsuite/gfortran.dg/submodule_6.f90
    trunk/gcc/testsuite/gfortran.dg/submodule_7.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/match.h
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/parse.h
    trunk/gcc/fortran/primary.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-07-02 20:40 ` pault at gcc dot gnu.org
@ 2015-07-03 19:00 ` pault at gcc dot gnu.org
  2015-07-13 15:44 ` sfilippone at uniroma2 dot it
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-03 19:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> ---
I have yet to sort out private symbols before I close this PR. It will take
some days to conclude because of the issues discussed on the list.

I'm on to it!

Paul


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-07-03 19:00 ` pault at gcc dot gnu.org
@ 2015-07-13 15:44 ` sfilippone at uniroma2 dot it
  2015-07-14 12:44 ` sfilippone at uniroma2 dot it
                   ` (17 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: sfilippone at uniroma2 dot it @ 2015-07-13 15:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #8 from Salvatore Filippone <sfilippone at uniroma2 dot it> ---
(In reply to Paul Thomas from comment #7)
> Created attachment 35926 [details]
> A partially cooked patch to complete the implentation of submodules
> 
> The attached is a first attempt to complete the submodule implementation
> such that private entities are correctly dealt with.
> 
> There are two parts to the patch:
> 
> (i) Modifications to the front end to write a second half to the module
> files, which contains all the information about the private entities in the
> module. This is the bulk of the patch; and
> 
> (ii) A change in the way that declarations of private entities are handled
> in trans-decl.c. This follows a suggestion from Richard Biener to use a
> technique borrowed from g++. In this patch it is only applied to variables.
> ............
> Cheers
> 
> Paul

Seems to work for my codes.

I am not completely happy with the fact that a change in the PRIVATE entities
will cause a change of the .mod file; it may be argued that changes are more
likely to occur in the submodules than in the main module, but still, this is
not 100% satisfactory wrt the advertisement that submodules are ssolving the
compilation cascade problem. 
>From a user's point of view, I do not see a good solution to this; if the .mod
file contains any kind of timestamp, it's going to change anyway, even in the
case where the PRIVATE part is written to a separate file. 

On a relate note, the point raised in the mailing list about protecting trade
secrets by putting them in the PRIVATE parts is IMHO moot: if I really wanted
to protect trade secrets, I would put them in a separate module that is only
ever USEd by the implementation files of the user visible module, files of
which I only distribute the object code. 
I don't think that C++ is any different in this respect. 

Salvatore


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-07-13 15:44 ` sfilippone at uniroma2 dot it
@ 2015-07-14 12:44 ` sfilippone at uniroma2 dot it
  2015-07-16 11:03 ` paul.richard.thomas at gmail dot com
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: sfilippone at uniroma2 dot it @ 2015-07-14 12:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #9 from Salvatore Filippone <sfilippone at uniroma2 dot it> ---
(In reply to Salvatore Filippone from comment #8)
> (In reply to Paul Thomas from comment #7)
> Salvatore

Spoke too quickly: I get this linker error

ppde3d.f90:(.text+0x9d0): undefined reference to
`__psb_error_mod_MOD_psb_perror'
../../lib/libpsb_prec.a(psb_dilu_fct.o): In function `psb_dilu_fct_':
psb_dilu_fct.f90:(.text+0x6a0): undefined reference to
`__psb_error_mod_MOD_psb_serror'
psb_dilu_fct.f90:(.text+0x21db): undefined reference to
`__psb_error_mod_MOD_psb_serror'


whereas the relevant implementation submodule shows:
0000000000000000 T __psb_error_impl_mod_MOD_psb_perror
0000000000000220 T __psb_error_impl_mod_MOD_psb_serror

i.e. the name mangling is going wrong.
Salvatore


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2015-07-14 12:44 ` sfilippone at uniroma2 dot it
@ 2015-07-16 11:03 ` paul.richard.thomas at gmail dot com
  2015-07-16 12:58 ` sfilippone at uniroma2 dot it
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: paul.richard.thomas at gmail dot com @ 2015-07-16 11:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #10 from paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> ---
Hi Salvatore,

If you could reduce the source that produces this error for me, I
would be grateful. By the looks of it, the name mangling is
functioning correctly but is picking up the wrong program unit name.

Thanks

Paul

On 14 July 2015 at 14:44, sfilippone at uniroma2 dot it
<gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846
>
> --- Comment #9 from Salvatore Filippone <sfilippone at uniroma2 dot it> ---
> (In reply to Salvatore Filippone from comment #8)
>> (In reply to Paul Thomas from comment #7)
>> Salvatore
>
> Spoke too quickly: I get this linker error
>
> ppde3d.f90:(.text+0x9d0): undefined reference to
> `__psb_error_mod_MOD_psb_perror'
> ../../lib/libpsb_prec.a(psb_dilu_fct.o): In function `psb_dilu_fct_':
> psb_dilu_fct.f90:(.text+0x6a0): undefined reference to
> `__psb_error_mod_MOD_psb_serror'
> psb_dilu_fct.f90:(.text+0x21db): undefined reference to
> `__psb_error_mod_MOD_psb_serror'
>
>
> whereas the relevant implementation submodule shows:
> 0000000000000000 T __psb_error_impl_mod_MOD_psb_perror
> 0000000000000220 T __psb_error_impl_mod_MOD_psb_serror
>
> i.e. the name mangling is going wrong.
> Salvatore
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You are the assignee for the bug.


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2015-07-16 11:03 ` paul.richard.thomas at gmail dot com
@ 2015-07-16 12:58 ` sfilippone at uniroma2 dot it
  2015-07-16 13:22 ` sfilippone at uniroma2 dot it
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: sfilippone at uniroma2 dot it @ 2015-07-16 12:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #12 from Salvatore Filippone <sfilippone at uniroma2 dot it> ---
(In reply to Salvatore Filippone from comment #11)
> Created attachment 35995 [details]
> test case

Enjoy :) 

[sfilippo@jacobi tlink]$ gfortran -v 
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/opt/gnu/dev/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-dev/configure --prefix=/opt/gnu/dev
--enable-languages=c,c++,fortran --with-gmp=/home/travel/GNUBUILD/gmp
--with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc
--with-cloog=/home/travel/GNUBUILD/cloog : (reconfigured) ../gcc-dev/configure
--prefix=/opt/gnu/dev --enable-languages=c,c++,fortran
--with-gmp=/home/travel/GNUBUILD/gmp --with-mpfr=/home/travel/GNUBUILD/mpfr
--with-mpc=/home/travel/GNUBUILD/mpc --with-cloog=/home/travel/GNUBUILD/cloog :
(reconfigured) ../gcc-dev/configure --prefix=/opt/gnu/dev
--with-gmp=/home/travel/GNUBUILD/gmp --with-mpfr=/home/travel/GNUBUILD/mpfr
--with-mpc=/home/travel/GNUBUILD/mpc --with-cloog=/home/travel/GNUBUILD/cloog
CC=gcc CXX=g++ --enable-languages=c,c++,fortran,lto --no-create --no-recursion
Thread model: posix
gcc version 6.0.0 20150713 (experimental) (GCC) 
[sfilippo@jacobi tlink]$ gfortran -o testlk testlk.f90 
/tmp/cchNLmkr.o: In function `__error_impl_mod_MOD_ser_error_print_stack':
testlk.f90:(.text+0x1b): undefined reference to `__error_mod_MOD_serror'
/tmp/cchNLmkr.o: In function `__error_impl_mod_MOD_par_error_print_stack':
testlk.f90:(.text+0x3b): undefined reference to `__error_mod_MOD_perror'
/tmp/cchNLmkr.o: In function `__error_mod_MOD_par_error_handler':
testlk.f90:(.text+0x5f): undefined reference to `erractionrestore_'
testlk.f90:(.text+0x7b): undefined reference to `__error_mod_MOD_perror'
testlk.f90:(.text+0x97): undefined reference to `__error_mod_MOD_perror'
/tmp/cchNLmkr.o: In function `__error_mod_MOD_ser_error_handler':
testlk.f90:(.text+0xb8): undefined reference to `erractionrestore_'
testlk.f90:(.text+0xc7): undefined reference to `__error_mod_MOD_serror'
/tmp/cchNLmkr.o: In function `MAIN__':
testlk.f90:(.text+0xfc): undefined reference to `__error_mod_MOD_serror'
collect2: error: ld returned 1 exit status


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2015-07-16 12:58 ` sfilippone at uniroma2 dot it
@ 2015-07-16 13:22 ` sfilippone at uniroma2 dot it
  2015-07-16 14:53 ` pault at gcc dot gnu.org
                   ` (13 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: sfilippone at uniroma2 dot it @ 2015-07-16 13:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #13 from Salvatore Filippone <sfilippone at uniroma2 dot it> ---
Created attachment 35996
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35996&action=edit
test case

Cleaned up a bit of noise due to the process of reducing the test case: it was
spitting out a legitimate but pointless liker error about erractionrestore.

[sfilippo@jacobi tlink]$ gfortran -o testlk testlk.f90 
/tmp/ccbhv5VA.o: In function `__error_impl_mod_MOD_ser_error_print_stack':
testlk.f90:(.text+0x1b): undefined reference to `__error_mod_MOD_serror'
/tmp/ccbhv5VA.o: In function `__error_impl_mod_MOD_par_error_print_stack':
testlk.f90:(.text+0x3b): undefined reference to `__error_mod_MOD_perror'
/tmp/ccbhv5VA.o: In function `__error_mod_MOD_par_error_handler':
testlk.f90:(.text+0x6a): undefined reference to `__error_mod_MOD_perror'
testlk.f90:(.text+0x86): undefined reference to `__error_mod_MOD_perror'
/tmp/ccbhv5VA.o: In function `__error_mod_MOD_ser_error_handler':
testlk.f90:(.text+0xa5): undefined reference to `__error_mod_MOD_serror'
/tmp/ccbhv5VA.o: In function `MAIN__':
testlk.f90:(.text+0xda): undefined reference to `__error_mod_MOD_serror'
collect2: error: ld returned 1 exit status


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2015-07-16 13:22 ` sfilippone at uniroma2 dot it
@ 2015-07-16 14:53 ` pault at gcc dot gnu.org
  2015-07-17 17:24 ` pault at gcc dot gnu.org
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-16 14:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #14 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Salvatore Filippone from comment #13)
> Created attachment 35996 [details]
> test case
> 
> Cleaned up a bit of noise due to the process of reducing the test case: it
> was spitting out a legitimate but pointless liker error about
> erractionrestore.
> 
> [sfilippo@jacobi tlink]$ gfortran -o testlk testlk.f90 
> /tmp/ccbhv5VA.o: In function `__error_impl_mod_MOD_ser_error_print_stack':
> testlk.f90:(.text+0x1b): undefined reference to `__error_mod_MOD_serror'
> /tmp/ccbhv5VA.o: In function `__error_impl_mod_MOD_par_error_print_stack':
> testlk.f90:(.text+0x3b): undefined reference to `__error_mod_MOD_perror'
> /tmp/ccbhv5VA.o: In function `__error_mod_MOD_par_error_handler':
> testlk.f90:(.text+0x6a): undefined reference to `__error_mod_MOD_perror'
> testlk.f90:(.text+0x86): undefined reference to `__error_mod_MOD_perror'
> /tmp/ccbhv5VA.o: In function `__error_mod_MOD_ser_error_handler':
> testlk.f90:(.text+0xa5): undefined reference to `__error_mod_MOD_serror'
> /tmp/ccbhv5VA.o: In function `MAIN__':
> testlk.f90:(.text+0xda): undefined reference to `__error_mod_MOD_serror'
> collect2: error: ld returned 1 exit status

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.

Thanks

Paul


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2015-07-16 14:53 ` pault at gcc dot gnu.org
@ 2015-07-17 17:24 ` pault at gcc dot gnu.org
  2015-07-17 17:25 ` pault at gcc dot gnu.org
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-17 17:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #15 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:23:45 2015
New Revision: 225945

URL: https://gcc.gnu.org/viewcvs?rev=225945&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (gfc_match_end): Pick out declared submodule name from
        the composite identifier.
        * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
        * module.c (gfc_match_submodule): Define submodule_name and add
        static 'submodule_name'.
        (gfc_match_submodule): Build up submodule filenames, using '@'
        as a delimiter. Store the output filename in 'submodule_name'.
        Similarly, the submodule identifier is built using '.' as an
        identifier.
        (gfc_dump_module): If current state is COMP_SUBMODULE, write
        to file 'submodule_name', using SUBMODULE_EXTENSION.
        (gfc_use_module): Similarly, use the 'submodule_name' field in
        the gfc_use_list structure and SUBMODULE_EXTENSION to read the
        implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * lib/fortran-modules.exp (proc cleanup-submodules): New
        procedure.
        * gfortran.dg/submodule_1.f08: Change extension and clean up
        the submodule files.
        * gfortran.dg/submodule_2.f08: ditto
        * gfortran.dg/submodule_6.f08: ditto
        * gfortran.dg/submodule_7.f08: ditto
        * gfortran.dg/submodule_8.f08: New test
        * gfortran.dg/submodule_9.f08: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_1.f08
      - copied, changed from r225943,
trunk/gcc/testsuite/gfortran.dg/submodule_1.f90
Removed:
    trunk/gcc/testsuite/gfortran.dg/submodule_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/module.c
    trunk/gcc/testsuite/lib/fortran-modules.exp


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2015-07-17 17:24 ` pault at gcc dot gnu.org
@ 2015-07-17 17:25 ` pault at gcc dot gnu.org
  2015-07-17 17:25 ` pault at gcc dot gnu.org
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-17 17:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #17 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:24:49 2015
New Revision: 225947

URL: https://gcc.gnu.org/viewcvs?rev=225947&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (gfc_match_end): Pick out declared submodule name from
        the composite identifier.
        * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
        * module.c (gfc_match_submodule): Define submodule_name and add
        static 'submodule_name'.
        (gfc_match_submodule): Build up submodule filenames, using '@'
        as a delimiter. Store the output filename in 'submodule_name'.
        Similarly, the submodule identifier is built using '.' as an
        identifier.
        (gfc_dump_module): If current state is COMP_SUBMODULE, write
        to file 'submodule_name', using SUBMODULE_EXTENSION.
        (gfc_use_module): Similarly, use the 'submodule_name' field in
        the gfc_use_list structure and SUBMODULE_EXTENSION to read the
        implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * lib/fortran-modules.exp (proc cleanup-submodules): New
        procedure.
        * gfortran.dg/submodule_1.f08: Change extension and clean up
        the submodule files.
        * gfortran.dg/submodule_2.f08: ditto
        * gfortran.dg/submodule_6.f08: ditto
        * gfortran.dg/submodule_7.f08: ditto
        * gfortran.dg/submodule_8.f08: New test
        * gfortran.dg/submodule_9.f08: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_3.f08
      - copied unchanged from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_3.f90
Removed:
    trunk/gcc/testsuite/gfortran.dg/submodule_3.f90


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2015-07-17 17:25 ` pault at gcc dot gnu.org
@ 2015-07-17 17:25 ` pault at gcc dot gnu.org
  2015-07-17 17:25 ` pault at gcc dot gnu.org
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-17 17:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #18 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:25:04 2015
New Revision: 225948

URL: https://gcc.gnu.org/viewcvs?rev=225948&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (gfc_match_end): Pick out declared submodule name from
        the composite identifier.
        * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
        * module.c (gfc_match_submodule): Define submodule_name and add
        static 'submodule_name'.
        (gfc_match_submodule): Build up submodule filenames, using '@'
        as a delimiter. Store the output filename in 'submodule_name'.
        Similarly, the submodule identifier is built using '.' as an
        identifier.
        (gfc_dump_module): If current state is COMP_SUBMODULE, write
        to file 'submodule_name', using SUBMODULE_EXTENSION.
        (gfc_use_module): Similarly, use the 'submodule_name' field in
        the gfc_use_list structure and SUBMODULE_EXTENSION to read the
        implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * lib/fortran-modules.exp (proc cleanup-submodules): New
        procedure.
        * gfortran.dg/submodule_1.f08: Change extension and clean up
        the submodule files.
        * gfortran.dg/submodule_2.f08: ditto
        * gfortran.dg/submodule_6.f08: ditto
        * gfortran.dg/submodule_7.f08: ditto
        * gfortran.dg/submodule_8.f08: New test
        * gfortran.dg/submodule_9.f08: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_4.f08
      - copied unchanged from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_4.f90
Removed:
    trunk/gcc/testsuite/gfortran.dg/submodule_4.f90


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2015-07-17 17:25 ` pault at gcc dot gnu.org
@ 2015-07-17 17:25 ` pault at gcc dot gnu.org
  2015-07-17 17:26 ` pault at gcc dot gnu.org
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-17 17:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #16 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:24:32 2015
New Revision: 225946

URL: https://gcc.gnu.org/viewcvs?rev=225946&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (gfc_match_end): Pick out declared submodule name from
        the composite identifier.
        * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
        * module.c (gfc_match_submodule): Define submodule_name and add
        static 'submodule_name'.
        (gfc_match_submodule): Build up submodule filenames, using '@'
        as a delimiter. Store the output filename in 'submodule_name'.
        Similarly, the submodule identifier is built using '.' as an
        identifier.
        (gfc_dump_module): If current state is COMP_SUBMODULE, write
        to file 'submodule_name', using SUBMODULE_EXTENSION.
        (gfc_use_module): Similarly, use the 'submodule_name' field in
        the gfc_use_list structure and SUBMODULE_EXTENSION to read the
        implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * lib/fortran-modules.exp (proc cleanup-submodules): New
        procedure.
        * gfortran.dg/submodule_1.f08: Change extension and clean up
        the submodule files.
        * gfortran.dg/submodule_2.f08: ditto
        * gfortran.dg/submodule_6.f08: ditto
        * gfortran.dg/submodule_7.f08: ditto
        * gfortran.dg/submodule_8.f08: New test
        * gfortran.dg/submodule_9.f08: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_2.f08
      - copied, changed from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_2.f90
Removed:
    trunk/gcc/testsuite/gfortran.dg/submodule_2.f90


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2015-07-17 17:25 ` pault at gcc dot gnu.org
@ 2015-07-17 17:26 ` pault at gcc dot gnu.org
  2015-07-17 17:26 ` pault at gcc dot gnu.org
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-17 17:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #20 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:26:12 2015
New Revision: 225955

URL: https://gcc.gnu.org/viewcvs?rev=225955&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (gfc_match_end): Pick out declared submodule name from
        the composite identifier.
        * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
        * module.c (gfc_match_submodule): Define submodule_name and add
        static 'submodule_name'.
        (gfc_match_submodule): Build up submodule filenames, using '@'
        as a delimiter. Store the output filename in 'submodule_name'.
        Similarly, the submodule identifier is built using '.' as an
        identifier.
        (gfc_dump_module): If current state is COMP_SUBMODULE, write
        to file 'submodule_name', using SUBMODULE_EXTENSION.
        (gfc_use_module): Similarly, use the 'submodule_name' field in
        the gfc_use_list structure and SUBMODULE_EXTENSION to read the
        implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * lib/fortran-modules.exp (proc cleanup-submodules): New
        procedure.
        * gfortran.dg/submodule_1.f08: Change extension and clean up
        the submodule files.
        * gfortran.dg/submodule_2.f08: ditto
        * gfortran.dg/submodule_6.f08: ditto
        * gfortran.dg/submodule_7.f08: ditto
        * gfortran.dg/submodule_8.f08: New test
        * gfortran.dg/submodule_9.f08: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_6.f08
      - copied, changed from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_6.f90
Removed:
    trunk/gcc/testsuite/gfortran.dg/submodule_6.f90


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2015-07-17 17:26 ` pault at gcc dot gnu.org
@ 2015-07-17 17:26 ` pault at gcc dot gnu.org
  2015-07-17 17:27 ` pault at gcc dot gnu.org
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-17 17:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #19 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:25:55 2015
New Revision: 225953

URL: https://gcc.gnu.org/viewcvs?rev=225953&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (gfc_match_end): Pick out declared submodule name from
        the composite identifier.
        * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
        * module.c (gfc_match_submodule): Define submodule_name and add
        static 'submodule_name'.
        (gfc_match_submodule): Build up submodule filenames, using '@'
        as a delimiter. Store the output filename in 'submodule_name'.
        Similarly, the submodule identifier is built using '.' as an
        identifier.
        (gfc_dump_module): If current state is COMP_SUBMODULE, write
        to file 'submodule_name', using SUBMODULE_EXTENSION.
        (gfc_use_module): Similarly, use the 'submodule_name' field in
        the gfc_use_list structure and SUBMODULE_EXTENSION to read the
        implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * lib/fortran-modules.exp (proc cleanup-submodules): New
        procedure.
        * gfortran.dg/submodule_1.f08: Change extension and clean up
        the submodule files.
        * gfortran.dg/submodule_2.f08: ditto
        * gfortran.dg/submodule_6.f08: ditto
        * gfortran.dg/submodule_7.f08: ditto
        * gfortran.dg/submodule_8.f08: New test
        * gfortran.dg/submodule_9.f08: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_5.f08
      - copied unchanged from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_5.f90
Removed:
    trunk/gcc/testsuite/gfortran.dg/submodule_5.f90


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2015-07-17 17:26 ` pault at gcc dot gnu.org
@ 2015-07-17 17:27 ` pault at gcc dot gnu.org
  2015-07-17 17:28 ` pault at gcc dot gnu.org
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-17 17:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #21 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:26:42 2015
New Revision: 225956

URL: https://gcc.gnu.org/viewcvs?rev=225956&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (gfc_match_end): Pick out declared submodule name from
        the composite identifier.
        * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
        * module.c (gfc_match_submodule): Define submodule_name and add
        static 'submodule_name'.
        (gfc_match_submodule): Build up submodule filenames, using '@'
        as a delimiter. Store the output filename in 'submodule_name'.
        Similarly, the submodule identifier is built using '.' as an
        identifier.
        (gfc_dump_module): If current state is COMP_SUBMODULE, write
        to file 'submodule_name', using SUBMODULE_EXTENSION.
        (gfc_use_module): Similarly, use the 'submodule_name' field in
        the gfc_use_list structure and SUBMODULE_EXTENSION to read the
        implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * lib/fortran-modules.exp (proc cleanup-submodules): New
        procedure.
        * gfortran.dg/submodule_1.f08: Change extension and clean up
        the submodule files.
        * gfortran.dg/submodule_2.f08: ditto
        * gfortran.dg/submodule_6.f08: ditto
        * gfortran.dg/submodule_7.f08: ditto
        * gfortran.dg/submodule_8.f08: New test
        * gfortran.dg/submodule_9.f08: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_7.f08
      - copied, changed from r225922,
trunk/gcc/testsuite/gfortran.dg/submodule_7.f90
Removed:
    trunk/gcc/testsuite/gfortran.dg/submodule_7.f90


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2015-07-17 17:27 ` pault at gcc dot gnu.org
@ 2015-07-17 17:28 ` pault at gcc dot gnu.org
  2015-07-17 17:32 ` pault at gcc dot gnu.org
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-17 17:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #22 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:27:42 2015
New Revision: 225957

URL: https://gcc.gnu.org/viewcvs?rev=225957&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (gfc_match_end): Pick out declared submodule name from
        the composite identifier.
        * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
        * module.c (gfc_match_submodule): Define submodule_name and add
        static 'submodule_name'.
        (gfc_match_submodule): Build up submodule filenames, using '@'
        as a delimiter. Store the output filename in 'submodule_name'.
        Similarly, the submodule identifier is built using '.' as an
        identifier.
        (gfc_dump_module): If current state is COMP_SUBMODULE, write
        to file 'submodule_name', using SUBMODULE_EXTENSION.
        (gfc_use_module): Similarly, use the 'submodule_name' field in
        the gfc_use_list structure and SUBMODULE_EXTENSION to read the
        implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * lib/fortran-modules.exp (proc cleanup-submodules): New
        procedure.
        * gfortran.dg/submodule_1.f08: Change extension and clean up
        the submodule files.
        * gfortran.dg/submodule_2.f08: ditto
        * gfortran.dg/submodule_6.f08: ditto
        * gfortran.dg/submodule_7.f08: ditto
        * gfortran.dg/submodule_8.f08: New test
        * gfortran.dg/submodule_9.f08: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_8.f08
    trunk/gcc/testsuite/gfortran.dg/submodule_9.f08


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2015-07-17 17:28 ` pault at gcc dot gnu.org
@ 2015-07-17 17:32 ` pault at gcc dot gnu.org
  2015-07-18  6:54 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-07-17 17:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #23 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:32:09 2015
New Revision: 225958

URL: https://gcc.gnu.org/viewcvs?rev=225958&root=gcc&view=rev
Log:
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * decl.c (gfc_match_end): Pick out declared submodule name from
        the composite identifier.
        * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
        * module.c (gfc_match_submodule): Define submodule_name and add
        static 'submodule_name'.
        (gfc_match_submodule): Build up submodule filenames, using '@'
        as a delimiter. Store the output filename in 'submodule_name'.
        Similarly, the submodule identifier is built using '.' as an
        identifier.
        (gfc_dump_module): If current state is COMP_SUBMODULE, write
        to file 'submodule_name', using SUBMODULE_EXTENSION.
        (gfc_use_module): Similarly, use the 'submodule_name' field in
        the gfc_use_list structure and SUBMODULE_EXTENSION to read the
        implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * lib/fortran-modules.exp (proc cleanup-submodules): New
        procedure.
        * gfortran.dg/submodule_1.f08: Change extension and clean up
        the submodule files.
        * gfortran.dg/submodule_2.f08: ditto
        * gfortran.dg/submodule_6.f08: ditto
        * gfortran.dg/submodule_7.f08: ditto
        * gfortran.dg/submodule_8.f08: New test
        * gfortran.dg/submodule_9.f08: New test

Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (20 preceding siblings ...)
  2015-07-17 17:32 ` pault at gcc dot gnu.org
@ 2015-07-18  6:54 ` Joost.VandeVondele at mat dot ethz.ch
  2015-08-05 12:07 ` pault at gcc dot gnu.org
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2015-07-18  6:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat dot ethz
                   |                            |.ch

--- Comment #24 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
(In reply to Paul Thomas from comment #23)

> 	(gfc_dump_module): If current state is COMP_SUBMODULE, write
> 	to file 'submodule_name', using SUBMODULE_EXTENSION.

just a comment / question. I wonder if the use of a different extension makes
life more easy / more difficult for people using dependencies based on .mod
files to stop recompilation cascades, or other aspects of the build system. I
haven't looked carefully enough at the submodule feature to know, but maybe it
is worth thinking about. Similarly, if the .smod changes, while this reflect in
a .mod timestamp change. 

There is obviously no standard requirement on this, but this gfortran feature
is very useful for those who develop & recompile large Fortran projects.
>From gcc-bugs-return-492718-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jul 18 07:10:19 2015
Return-Path: <gcc-bugs-return-492718-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17651 invoked by alias); 18 Jul 2015 07:10:18 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 17607 invoked by uid 48); 18 Jul 2015 07:10:14 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/66865] [6 Regression] wine64 segfaults from gcc in trunk (r225757) (regression)
Date: Sat, 18 Jul 2015 07:10:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: WORKSFORME
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-66865-4-UvFgGf05n2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66865-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66865-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg01608.txt.bz2
Content-length: 678

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66865

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #16 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to austinenglish from comment #15)
> > Can you please retry now that PR 66782 and PR 66838 are both fixed on
> > mainline and gcc-5 branch?
> 
> Works here in r225965 / da5e6421269c9683f17fb5e6e3bacfec50f22239.

Closing PR as worksforme.
>From gcc-bugs-return-492719-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jul 18 07:11:53 2015
Return-Path: <gcc-bugs-return-492719-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20464 invoked by alias); 18 Jul 2015 07:11:52 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 20418 invoked by uid 48); 18 Jul 2015 07:11:48 -0000
From: "marcus at jet dot franken.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/66865] [6 Regression] wine64 segfaults from gcc in trunk (r225757) (regression)
Date: Sat, 18 Jul 2015 07:11:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: marcus at jet dot franken.de
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: WORKSFORME
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66865-4-8RMDz8C2LE@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66865-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66865-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg01609.txt.bz2
Content-length: 226

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf865

--- Comment #17 from marcus at jet dot franken.de ---
can also confirm this. wine64 built with trunk gcc so far has no crashes and
the wine testsuite so far had no failures


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (21 preceding siblings ...)
  2015-07-18  6:54 ` Joost.VandeVondele at mat dot ethz.ch
@ 2015-08-05 12:07 ` pault at gcc dot gnu.org
  2015-09-17  9:10 ` pault at gcc dot gnu.org
  2015-10-18 10:57 ` pault at gcc dot gnu.org
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-08-05 12:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #25 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Wed Aug  5 12:06:25 2015
New Revision: 226622

URL: https://gcc.gnu.org/viewcvs?rev=226622&root=gcc&view=rev
Log:
2015-08-05  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * module.c (check_access): Return true if new static flag
        'dump_smod' is true..
        (gfc_dump_module): Rename original 'dump_module' and call from
        new version. Use 'dump_smod' rather than the stack state to
        determine if a submodule is being processed. The new version of
        this procedure sets 'dump_smod' depending on the stack state and
        then writes both the mod and smod files if a module is being
        processed or just the smod for a submodule.
        (gfc_use_module): Eliminate the check for module_name and
        submodule_name being the same.
        * trans-decl.c (gfc_finish_var_decl, gfc_build_qualified_array,
        get_proc_pointer_decl): Set TREE_PUBLIC unconditionally and use
        the conditions to set DECL_VISIBILITY as hidden and to set as
        true DECL_VISIBILITY_SPECIFIED.

2015-08-05  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846

        * lib/fortran-modules.exp: Call cleanup-submodules from
        cleanup-modules.
        * gfortran.dg/public_private_module_2.f90: Add two XFAILS to
        cover the cases where private entities are no longer optimized
        away.
        * gfortran.dg/public_private_module_6.f90: Add an XFAIL for the
        same reason.
        * gfortran.dg/submodule_1.f08: Change cleanup module names.
        * gfortran.dg/submodule_5.f08: The same.
        * gfortran.dg/submodule_9.f08: The same.
        * gfortran.dg/submodule_10.f08: New test

Added:
    trunk/gcc/testsuite/gfortran.dg/submodule_10.f08
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/public_private_module_2.f90
    trunk/gcc/testsuite/gfortran.dg/public_private_module_6.f90
    trunk/gcc/testsuite/gfortran.dg/submodule_1.f08
    trunk/gcc/testsuite/gfortran.dg/submodule_5.f08
    trunk/gcc/testsuite/gfortran.dg/submodule_9.f08
    trunk/gcc/testsuite/lib/fortran-modules.exp


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (22 preceding siblings ...)
  2015-08-05 12:07 ` pault at gcc dot gnu.org
@ 2015-09-17  9:10 ` pault at gcc dot gnu.org
  2015-10-18 10:57 ` pault at gcc dot gnu.org
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-09-17  9:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

--- Comment #27 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Thu Sep 17 09:09:34 2015
New Revision: 227855

URL: https://gcc.gnu.org/viewcvs?rev=227855&root=gcc&view=rev
Log:
2015-09-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        PR fortran/67588
        * module.c : Add static no_module_procedures.
        (gfc_match_submodule): Correct memory leakage caused during the
        freeing of use_lists.
        (mio_symbol_attribute): Reset above if module procedure is
        encountered.
        (gfc_dump_module): Set above and exit without writing smod file
        if it reset.
        * gfortran.texi : Add section on submodule support.

2015-09-17  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/52846
        * gfortran.dg/public_private_module_5.f90: Add module procedure
        trigger_smod to ensure that the smod file is written.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.texi
    trunk/gcc/fortran/module.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/submodule_5.f08


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

* [Bug fortran/52846] [F2008] Support submodules
  2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
                   ` (23 preceding siblings ...)
  2015-09-17  9:10 ` pault at gcc dot gnu.org
@ 2015-10-18 10:57 ` pault at gcc dot gnu.org
  24 siblings, 0 replies; 26+ messages in thread
From: pault at gcc dot gnu.org @ 2015-10-18 10:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846

Paul Thomas <pault at gcc dot gnu.org> changed:

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

--- Comment #28 from Paul Thomas <pault at gcc dot gnu.org> ---
The LTO issue is another PR, so closing this one

Paul


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

end of thread, other threads:[~2015-10-18 10:57 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03 15:00 [Bug fortran/52846] New: [F2008] Support submodules burnus at gcc dot gnu.org
2014-12-21 15:31 ` [Bug fortran/52846] " dominiq at lps dot ens.fr
2015-06-14 19:46 ` pault at gcc dot gnu.org
2015-06-14 19:47 ` pault at gcc dot gnu.org
2015-06-14 19:48 ` pault at gcc dot gnu.org
2015-07-02 20:40 ` pault at gcc dot gnu.org
2015-07-03 19:00 ` pault at gcc dot gnu.org
2015-07-13 15:44 ` sfilippone at uniroma2 dot it
2015-07-14 12:44 ` sfilippone at uniroma2 dot it
2015-07-16 11:03 ` paul.richard.thomas at gmail dot com
2015-07-16 12:58 ` sfilippone at uniroma2 dot it
2015-07-16 13:22 ` sfilippone at uniroma2 dot it
2015-07-16 14:53 ` pault at gcc dot gnu.org
2015-07-17 17:24 ` pault at gcc dot gnu.org
2015-07-17 17:25 ` pault at gcc dot gnu.org
2015-07-17 17:25 ` pault at gcc dot gnu.org
2015-07-17 17:25 ` pault at gcc dot gnu.org
2015-07-17 17:26 ` pault at gcc dot gnu.org
2015-07-17 17:26 ` pault at gcc dot gnu.org
2015-07-17 17:27 ` pault at gcc dot gnu.org
2015-07-17 17:28 ` pault at gcc dot gnu.org
2015-07-17 17:32 ` pault at gcc dot gnu.org
2015-07-18  6:54 ` Joost.VandeVondele at mat dot ethz.ch
2015-08-05 12:07 ` pault at gcc dot gnu.org
2015-09-17  9:10 ` pault at gcc dot gnu.org
2015-10-18 10:57 ` pault 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).