public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
@ 2010-10-26 7:46 ` burnus at gcc dot gnu.org
2010-12-02 4:35 ` damian at rouson dot net
` (66 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-10-26 7:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-10-26 07:45:53 UTC ---
Related issue: When a polymorphic types has to be finallized, e.g. when it
leaves the scope, the allocatable components of the effective type have to be
freed - not only those of the declared type. Cf. PR 46174
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
2010-10-26 7:46 ` [Bug fortran/37336] Fortran 2003: Finish derived-type finalization burnus at gcc dot gnu.org
@ 2010-12-02 4:35 ` damian at rouson dot net
2010-12-27 2:04 ` dfranke at gcc dot gnu.org
` (65 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: damian at rouson dot net @ 2010-12-02 4:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Damian Rouson <damian at rouson dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |damian at rouson dot net
--- Comment #6 from Damian Rouson <damian at rouson dot net> 2010-12-02 04:35:39 UTC ---
The test case below is a test of finalization of a concrete component of an
abstract type when a type that extends the abstract type goes out of scope.
I'm working on determining how many times the final subroutine should be called
-- certainly at least once to finalize the new_child function result when it
goes out of scope after the assignment.
module finalizable_component_module
implicit none
type finalizable_component
contains
final :: finalize
end type
contains
subroutine finalize(this)
type(finalizable_component) :: this
print *,'subroutine finalize called'
end subroutine
end module
module abstract_parent_module
use finalizable_component_module
implicit none
type ,abstract :: abstract_parent
type(finalizable_component) :: foo
end type
end module
module child_module
use abstract_parent_module
implicit none
type, extends(abstract_parent) :: child
end type
contains
type(child) function new_child()
end function
end module
program main
use child_module
implicit none
type(child) :: infant
infant = new_child()
end
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
2010-10-26 7:46 ` [Bug fortran/37336] Fortran 2003: Finish derived-type finalization burnus at gcc dot gnu.org
2010-12-02 4:35 ` damian at rouson dot net
@ 2010-12-27 2:04 ` dfranke at gcc dot gnu.org
2012-03-15 17:41 ` w6ws at earthlink dot net
` (64 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: dfranke at gcc dot gnu.org @ 2010-12-27 2:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Daniel Franke <dfranke at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu.org
--- Comment #7 from Daniel Franke <dfranke at gcc dot gnu.org> 2010-12-27 02:04:07 UTC ---
I had the vague impression that FINAL was already completed, so I gave it a try
...
polytest.f90:28.22:
SUBROUTINE free(this)
1
Error: Argument of FINAL procedure at (1) must be of type 'abstract_weight'
for
SUBROUTINE free(this)
CLASS(abstract_weight), INTENT(inout) :: this
! ...
END SUBROUTINE
Placing the error marker at CLASS() and rewording to "must be of
'TYPE(abstract_weight)'" might ease some confusion. It took me a while to
figure out what's wrong ^^
However, any plans to get this completed in the foreseeable future?
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2010-12-27 2:04 ` dfranke at gcc dot gnu.org
@ 2012-03-15 17:41 ` w6ws at earthlink dot net
2012-03-18 15:53 ` tkoenig at gcc dot gnu.org
` (63 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: w6ws at earthlink dot net @ 2012-03-15 17:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #8 from Walter Spector <w6ws at earthlink dot net> 2012-03-15 17:24:59 UTC ---
Should this bug report number be added to the F2003 meta bug?
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20585)
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2012-03-15 17:41 ` w6ws at earthlink dot net
@ 2012-03-18 15:53 ` tkoenig at gcc dot gnu.org
2012-05-07 10:20 ` burnus at gcc dot gnu.org
` (62 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-03-18 15:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkoenig at gcc dot gnu.org
Blocks| |20585
--- Comment #9 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-03-18 15:22:17 UTC ---
(In reply to comment #8)
> Should this bug report number be added to the F2003 meta bug?
> (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20585)
You're right, added.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2012-03-18 15:53 ` tkoenig at gcc dot gnu.org
@ 2012-05-07 10:20 ` burnus at gcc dot gnu.org
2012-09-03 6:37 ` burnus at gcc dot gnu.org
` (61 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-05-07 10:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
AssignedTo|domob at gcc dot gnu.org |unassigned at gcc dot
| |gnu.org
--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-07 10:09:52 UTC ---
Regarding FINAL but also normal deallocation - including polymorphic
deallocation: Variables with the SAVE attribute shouldn't be automatically
deallocated. That includes variables of the main program which are implicitly
SAVE!
Currently, gfortran deallocates them automatically, which is nice for
"valgrind" results - and not detectable by the program.
However, with FINAL - but also for allocatable coarrays (except
-fcoarray=single) - one cannot do it. Coarrays might be still accessed from
other images while FINAL shouldn't be called - thus a simple 'print *,
"gotcha"' in FINAL would be able to detect this.
Note: A normal freeing for noncoarrays, including polymorphic freeing, would be
still possible if one simply skips all FINAL calls. At least I do not see how
that should be detectable from within the program.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2012-05-07 10:20 ` burnus at gcc dot gnu.org
@ 2012-09-03 6:37 ` burnus at gcc dot gnu.org
2012-09-22 17:08 ` burnus at gcc dot gnu.org
` (60 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-09-03 6:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-03 06:36:05 UTC ---
Author: burnus
Date: Mon Sep 3 06:35:59 2012
New Revision: 190869
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190869
Log:
2012-09-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* gfortran.h (symbol_attribute): Add artificial.
* module.c (mio_symbol_attribute): Handle attr.artificial
* class.c (gfc_build_class_symbol): Defer creation of the vtab
if the DT has finalizers, mark generated symbols as
attr.artificial.
(has_finalizer_component, finalize_component,
finalization_scalarizer, generate_finalization_wrapper):
New static functions.
(gfc_find_derived_vtab): Add _final component and call
generate_finalization_wrapper.
* dump-parse-tree.c (show_f2k_derived): Use resolved
proc_tree->n.sym rather than unresolved proc_sym.
(show_attr): Handle attr.artificial.
* resolve.c (gfc_resolve_finalizers): Ensure that the vtab
* exists.
(resolve_fl_derived): Resolve finalizers before
generating the vtab.
(resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
skip artificial symbols.
(resolve_fl_derived0): Skip artificial symbols.
2012-09-03 Tobias Burnus <burnus@net-b.de>
PR fortran/51632
* gfortran.dg/coarray_class_1.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/coarray_class_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
trunk/gcc/fortran/dump-parse-tree.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/module.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2012-09-03 6:37 ` burnus at gcc dot gnu.org
@ 2012-09-22 17:08 ` burnus at gcc dot gnu.org
2012-10-26 16:47 ` janus at gcc dot gnu.org
` (59 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-09-22 17:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #12 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-22 17:08:08 UTC ---
Incomplete but mostly finished draft patches:
https://userpage.physik.fu-berlin.de/~tburnus/final/
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2012-09-22 17:08 ` burnus at gcc dot gnu.org
@ 2012-10-26 16:47 ` janus at gcc dot gnu.org
2012-11-27 20:04 ` burnus at gcc dot gnu.org
` (58 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2012-10-26 16:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #13 from janus at gcc dot gnu.org 2012-10-26 16:47:08 UTC ---
Latest patch at: http://gcc.gnu.org/ml/fortran/2012-10/msg00126.html
This patch compiles the test case in comment 6 without errors, but the
finalizer is not called.
However, when changing the main program to ...
program main
use child_module
implicit none
class(child),allocatable :: infant
allocate(infant,source=new_child())
end
... the finalizer is called twice: Once at the end of the main program, and
once through the _copy procedure (which is invoked by the ALLOCATE statement),
I think. Not sure if this is the expected behavior.
If the "class(child)" here is changed to "type(child)", no finalization is done
(and in fact not even a finalization routine is generated for the type
'child').
But certainly it should, just as for the original test case in comment 6.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2012-10-26 16:47 ` janus at gcc dot gnu.org
@ 2012-11-27 20:04 ` burnus at gcc dot gnu.org
2012-12-03 8:55 ` burnus at gcc dot gnu.org
` (57 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-11-27 20:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #14 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-27 20:04:21 UTC ---
(In reply to comment #13)
> class(child),allocatable :: infant
> allocate(infant,source=new_child())
> ... the finalizer is called twice: Once at the end of the main program, and
> once through the _copy procedure (which is invoked by the ALLOCATE statement),
> I think. Not sure if this is the expected behavior.
The invocation through the _copy wrapper is a bug for ALLOCATE. However, it's
fine for "a = b" which invoke _copy. I believe _copy should use "intent(inout)
dst" instead of "intent(out)" dest – and if needed (e.g. intrinsic assignment),
_final should be called directly. Then one can also replace "calloc" and
"memset '\0'" by a simple "malloc". (Caveat: One should check that coarray
components are properly handled; possibly, _copy also needs a "coarray"
argument as _final has.)
* * *
Current FINAL-wrapper patch (submitted) - it is still preparatory and doesn't
call finalization subroutines:
http://gcc.gnu.org/ml/fortran/2012-11/msg00086.html
See also draft patches at https://userpage.physik.fu-berlin.de/~tburnus/final/
and http://gcc.gnu.org/ml/fortran/2012-11/msg00009.html
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2012-11-27 20:04 ` burnus at gcc dot gnu.org
@ 2012-12-03 8:55 ` burnus at gcc dot gnu.org
2012-12-03 9:01 ` janus at gcc dot gnu.org
` (56 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-12-03 8:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #15 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-12-03 08:54:26 UTC ---
Author: burnus
Date: Mon Dec 3 08:54:18 2012
New Revision: 194075
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194075
Log:
2012-11-03 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* class.c (finalizer_insert_packed_call): New static function.
(finalize_component, generate_finalization_wrapper):
Fix coarray handling and packing.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2012-12-03 8:55 ` burnus at gcc dot gnu.org
@ 2012-12-03 9:01 ` janus at gcc dot gnu.org
2012-12-03 21:14 ` burnus at gcc dot gnu.org
` (55 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2012-12-03 9:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #16 from janus at gcc dot gnu.org 2012-12-03 09:00:14 UTC ---
(In reply to comment #15)
> Author: burnus
> Date: Mon Dec 3 08:54:18 2012
> New Revision: 194075
>
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194075
> Log:
> 2012-11-03 Tobias Burnus <burnus@net-b.de>
Nitpicking: Wrong date! (It's December already ;)
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2012-12-03 9:01 ` janus at gcc dot gnu.org
@ 2012-12-03 21:14 ` burnus at gcc dot gnu.org
2012-12-05 8:54 ` janus at gcc dot gnu.org
` (54 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-12-03 21:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #17 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-12-03 21:13:50 UTC ---
Author: burnus
Date: Mon Dec 3 21:13:42 2012
New Revision: 194104
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194104
Log:
2012-12-03 Tobias Burnus <burnus@net-b.de>
Janus Weil <janus@gcc.gnu.org>
PR fortran/37336
* class.c (gfc_is_finalizable): New function.
* gfortran.h (gfc_is_finalizable): Its prototype.
* module.c (mio_component): Read initializer for vtype's _final.
* resolve.c (resolve_fl_derived0): Call gfc_is_finalizable.
* trans-expr.c (gfc_vtable_final_get): New function.
(conv_parent_component_references): Fix comment.
(gfc_conv_variable): Fix for scalar coarray components.
* trans-intrinsic.c (conv_intrinsic_move_alloc): For BT_CLASS,
pass the BT_CLASS type and not the declared type to
gfc_deallocate_scalar_with_status.
* trans.h (gfc_vtable_final_get): New prototype.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/module.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/fortran/trans.h
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2012-12-03 21:14 ` burnus at gcc dot gnu.org
@ 2012-12-05 8:54 ` janus at gcc dot gnu.org
2013-05-28 18:31 ` burnus at gcc dot gnu.org
` (53 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2012-12-05 8:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |55207, 55603
--- Comment #18 from janus at gcc dot gnu.org 2012-12-05 08:54:01 UTC ---
Adding two auto-dealloc bugs, which need to be fixed in order to get correct
finalization calls.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (13 preceding siblings ...)
2012-12-05 8:54 ` janus at gcc dot gnu.org
@ 2013-05-28 18:31 ` burnus at gcc dot gnu.org
2013-05-28 18:33 ` burnus at gcc dot gnu.org
` (52 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-28 18:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |burnus at gcc dot gnu.org
--- Comment #19 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Tue May 28 18:30:03 2013
New Revision: 199388
URL: http://gcc.gnu.org/viewcvs?rev=199388&root=gcc&view=rev
Log:
2013-05-28 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* resolve.c (gfc_resolve_finalizers): Remove not implemented
* error.
2013-05-28 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* gfortran.dg/finalize_11.f90: New.
* gfortran.dg/finalize_4.f03: Remove dg-error.
* gfortran.dg/finalize_5.f03: Ditto.
* gfortran.dg/finalize_6.f03: Ditto.
* gfortran.dg/finalize_7.f03: Ditto.
Added:
trunk/gcc/testsuite/gfortran.dg/finalize_11.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/finalize_4.f03
trunk/gcc/testsuite/gfortran.dg/finalize_5.f03
trunk/gcc/testsuite/gfortran.dg/finalize_6.f90
trunk/gcc/testsuite/gfortran.dg/finalize_7.f03
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (14 preceding siblings ...)
2013-05-28 18:31 ` burnus at gcc dot gnu.org
@ 2013-05-28 18:33 ` burnus at gcc dot gnu.org
2013-05-29 13:23 ` burnus at gcc dot gnu.org
` (51 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-28 18:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #20 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The patch in comment 19 enables the FINAL parsing.
Note: No actual finalization is done, yet. However, the first calls to the
finalization subroutines will be added soon.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (15 preceding siblings ...)
2013-05-28 18:33 ` burnus at gcc dot gnu.org
@ 2013-05-29 13:23 ` burnus at gcc dot gnu.org
2013-05-29 13:26 ` burnus at gcc dot gnu.org
` (50 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-29 13:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #21 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Wed May 29 13:15:16 2013
New Revision: 199409
URL: http://gcc.gnu.org/viewcvs?rev=199409&root=gcc&view=rev
Log:
2013-05-28 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* class.c (finalize_component): Fix coarray array refs.
(generate_finalization_wrapper): Only gfc_convert_type_warn
when the kind value is different.
(gfc_find_intrinsic_vtab): _copy's dst is now intent(inout).
(gfc_find_derived_vtab): Ditto. Enable finalization-wrapper
generation.
* module.c (MOD_VERSION): Bump.
(gfc_dump_module, gfc_use_module): Remove empty line in .mod.
* trans-array.c (gfc_conv_descriptor_token): Accept
* nonrestricted
void pointer.
(gfc_array_allocate, structure_alloc_comps): Don't nullify for
BT_CLASS allocations.
* trans-stmt.c (gfc_trans_allocate): Ditto.
2013-05-28 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* gfortran.dg/auto_dealloc_2.f90: Update _free count in the
* dump.
* gfortran.dg/class_19.f03: Ditto.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
trunk/gcc/fortran/module.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90
trunk/gcc/testsuite/gfortran.dg/class_19.f03
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (16 preceding siblings ...)
2013-05-29 13:23 ` burnus at gcc dot gnu.org
@ 2013-05-29 13:26 ` burnus at gcc dot gnu.org
2013-06-04 10:21 ` burnus at gcc dot gnu.org
` (49 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-29 13:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #22 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The patch in comment 21 enables the generation of the finalization wrapper,
which is at the heart of finalization.
Note: No actual finalization is done, yet. Still missing are calls to the
finalization wrapper. That will be a lengthier process. The first patch of that
series is available at http://gcc.gnu.org/ml/fortran/2013-05/msg00107.html
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (17 preceding siblings ...)
2013-05-29 13:26 ` burnus at gcc dot gnu.org
@ 2013-06-04 10:21 ` burnus at gcc dot gnu.org
2013-06-04 10:27 ` burnus at gcc dot gnu.org
` (48 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-04 10:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #23 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Tue Jun 4 10:20:32 2013
New Revision: 199643
URL: http://gcc.gnu.org/viewcvs?rev=199643&root=gcc&view=rev
Log:
2013-06-03 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* trans.h (gfc_build_final_call): Remove prototype.
(gfc_add_finalizer_call): Add prototype.
* trans-array.c (gfc_trans_dealloc_allocated): Support
* finalization.
(structure_alloc_comps): Update caller.
(gfc_trans_deferred_array): Call finalizer.
* trans-array.h (gfc_trans_dealloc_allocated): Update prototype.
* trans-decl.c (gfc_trans_deferred_vars): Don't
* deallocate/finalize
variables of the main program.
* trans-expr.c (gfc_conv_procedure_call): Support finalization.
* trans-openmp.c (gfc_omp_clause_dtor,
gfc_trans_omp_array_reduction): Update calls.
* trans-stmt.c (gfc_trans_deallocate): Avoid double deallocation
of alloc components.
* trans.c (gfc_add_finalizer_call): New function.
(gfc_deallocate_with_status,
gfc_deallocate_scalar_with_status): Call it
(gfc_build_final_call): Fix handling of scalar coarrays,
move up in the file and make static.
2013-06-03 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* gfortran.dg/finalize_12.f90: New.
* gfortran.dg/alloc_comp_basics_1.f90: Add BLOCK for
end of scope finalization.
* gfortran.dg/alloc_comp_constructor_1.f90: Ditto.
* gfortran.dg/allocatable_scalar_9.f90: Ditto.
* gfortran.dg/auto_dealloc_2.f90: Ditto.
* gfortran.dg/class_19.f03: Ditto.
* gfortran.dg/coarray_lib_alloc_1.f90: Ditto.
* gfortran.dg/coarray_lib_alloc_2.f90: Ditto.
* gfortran.dg/extends_14.f03: Ditto.
* gfortran.dg/move_alloc_4.f90: Ditto.
* gfortran.dg/typebound_proc_27.f03: Ditto.
Added:
trunk/gcc/testsuite/gfortran.dg/finalize_12.f90
trunk/gcc/testsuite/gfortran.dg/finalize_13.f90
trunk/gcc/testsuite/gfortran.dg/finalize_14.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-array.h
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-openmp.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/fortran/trans.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f90
trunk/gcc/testsuite/gfortran.dg/alloc_comp_constructor_1.f90
trunk/gcc/testsuite/gfortran.dg/allocatable_scalar_9.f90
trunk/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90
trunk/gcc/testsuite/gfortran.dg/class_19.f03
trunk/gcc/testsuite/gfortran.dg/coarray_lib_alloc_1.f90
trunk/gcc/testsuite/gfortran.dg/coarray_lib_alloc_2.f90
trunk/gcc/testsuite/gfortran.dg/extends_14.f03
trunk/gcc/testsuite/gfortran.dg/move_alloc_4.f90
trunk/gcc/testsuite/gfortran.dg/typebound_proc_27.f03
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (18 preceding siblings ...)
2013-06-04 10:21 ` burnus at gcc dot gnu.org
@ 2013-06-04 10:27 ` burnus at gcc dot gnu.org
2013-06-08 12:28 ` burnus at gcc dot gnu.org
` (47 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-04 10:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #24 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The patch in comment 23 adds finalization support for allocatables (end of
scope, intent(out), DEALLOCATE, MOVE_ALLOC).
Thus, on the trunk (GCC 4.9), finalization is now finally supported :-)
Note: There are additional cases for which finalization has to be done, e.g.
for intent(out) of nonallocatable (patch:
http://gcc.gnu.org/ml/fortran/2013-05/msg00135.html), end-of-scope of
nonallocatables, intrinsic assignment, function results + array/structure
constructors - after there use in expressions.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (19 preceding siblings ...)
2013-06-04 10:27 ` burnus at gcc dot gnu.org
@ 2013-06-08 12:28 ` burnus at gcc dot gnu.org
2013-06-21 21:53 ` burnus at gcc dot gnu.org
` (46 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-08 12:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #25 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Sat Jun 8 12:26:40 2013
New Revision: 199851
URL: http://gcc.gnu.org/viewcvs?rev=199851&root=gcc&view=rev
Log:
2013-06-08 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* trans-decl.c (init_intent_out_dt): Call finalizer
when approriate.
2013-06-08 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* gfortran.dg/finalize_10.f90: New.
* gfortran.dg/auto_dealloc_2.f90: Update tree-dump.
* gfortran.dg/finalize_15.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/finalize_10.f90
trunk/gcc/testsuite/gfortran.dg/finalize_15.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (20 preceding siblings ...)
2013-06-08 12:28 ` burnus at gcc dot gnu.org
@ 2013-06-21 21:53 ` burnus at gcc dot gnu.org
2013-07-22 11:01 ` janus at gcc dot gnu.org
` (45 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-21 21:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #26 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Fri Jun 21 21:51:41 2013
New Revision: 200321
URL: http://gcc.gnu.org/viewcvs?rev=200321&root=gcc&view=rev
Log:
2013-06-21 Tobias Burnus <burnus@net-b.de>
* trans-array.c (gfc_trans_deferred_array): Call the
finalizer for nonallocatable local variables.
* trans-decl.c (gfc_get_symbol_decl): Add local
finalizable vars to the deferred list.
(gfc_trans_deferred_vars): Call gfc_trans_deferred_array
for those.
2013-06-21 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/finalize_17.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/finalize_17.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (21 preceding siblings ...)
2013-06-21 21:53 ` burnus at gcc dot gnu.org
@ 2013-07-22 11:01 ` janus at gcc dot gnu.org
2013-07-31 20:43 ` janus at gcc dot gnu.org
` (44 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2013-07-22 11:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 55207, which changed state.
Bug 55207 Summary: Automatic deallocation of variables declared in the main program
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55207
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] Fortran 2003: Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (22 preceding siblings ...)
2013-07-22 11:01 ` janus at gcc dot gnu.org
@ 2013-07-31 20:43 ` janus at gcc dot gnu.org
2014-01-12 11:12 ` [Bug fortran/37336] [F03] " janus at gcc dot gnu.org
` (43 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2013-07-31 20:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 55207, which changed state.
Bug 55207 Summary: Automatic deallocation of variables declared in the main program
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55207
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (23 preceding siblings ...)
2013-07-31 20:43 ` janus at gcc dot gnu.org
@ 2014-01-12 11:12 ` janus at gcc dot gnu.org
2014-02-08 21:36 ` janus at gcc dot gnu.org
` (42 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-12 11:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 58026, which changed state.
Bug 58026 Summary: [F03] Bad error recovery for allocatable component of undeclared type
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58026
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (24 preceding siblings ...)
2014-01-12 11:12 ` [Bug fortran/37336] [F03] " janus at gcc dot gnu.org
@ 2014-02-08 21:36 ` janus at gcc dot gnu.org
2014-03-15 12:14 ` janus at gcc dot gnu.org
` (41 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2014-02-08 21:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 58470, which changed state.
Bug 58470 Summary: [4.9 Regression] [OOP] ICE on invalid with FINAL procedure and type extension
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58470
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (25 preceding siblings ...)
2014-02-08 21:36 ` janus at gcc dot gnu.org
@ 2014-03-15 12:14 ` janus at gcc dot gnu.org
2014-03-18 22:23 ` janus at gcc dot gnu.org
` (40 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2014-03-15 12:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 55207, which changed state.
Bug 55207 Summary: [F08] Variables declared in the main program should implicitly get the SAVE attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55207
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (26 preceding siblings ...)
2014-03-15 12:14 ` janus at gcc dot gnu.org
@ 2014-03-18 22:23 ` janus at gcc dot gnu.org
2014-12-15 11:50 ` janus at gcc dot gnu.org
` (39 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2014-03-18 22:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 55207, which changed state.
Bug 55207 Summary: [F08] Variables declared in the main program should implicitly get the SAVE attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55207
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (27 preceding siblings ...)
2014-03-18 22:23 ` janus at gcc dot gnu.org
@ 2014-12-15 11:50 ` janus at gcc dot gnu.org
2015-02-15 16:03 ` dominiq at lps dot ens.fr
` (38 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: janus at gcc dot gnu.org @ 2014-12-15 11:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #28 from janus at gcc dot gnu.org ---
(In reply to janus from comment #27)
> Currently missing are:
>
> a) Finalization of the LHS during intrinsic assignment:
aka PR 64290
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (28 preceding siblings ...)
2014-12-15 11:50 ` janus at gcc dot gnu.org
@ 2015-02-15 16:03 ` dominiq at lps dot ens.fr
2015-02-15 16:58 ` sourcery at rouson dot net
` (37 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-02-15 16:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 59765, which changed state.
Bug 59765 Summary: [4.9/5 Regression] [OOP] ICE on valid with finalizable array components
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59765
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (29 preceding siblings ...)
2015-02-15 16:03 ` dominiq at lps dot ens.fr
@ 2015-02-15 16:58 ` sourcery at rouson dot net
2015-09-03 16:08 ` dominiq at lps dot ens.fr
` (36 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: sourcery at rouson dot net @ 2015-02-15 16:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #29 from sourcery at rouson dot net ---
Good news.
Hopefully you saw the email about the tutorial proposals. Strangely ISC asks
for "1/2 page" CVs, which I interpret as half-page CVs (Karla was hoping they
meant 1-2 page, but I think we should err on the safer side. You'll probably
want to checkout the reduced version I constructed for you.
D
D
Sent from my iPhone
> On Feb 15, 2015, at 8:03 AM, dominiq at lps dot ens.fr <gcc-bugzilla@gcc.gnu.org> wrote:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
> Bug 37336 depends on bug 59765, which changed state.
>
> Bug 59765 Summary: [4.9/5 Regression] [OOP] ICE on valid with finalizable array components
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59765
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|NEW |RESOLVED
> Resolution|--- |FIXED
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (30 preceding siblings ...)
2015-02-15 16:58 ` sourcery at rouson dot net
@ 2015-09-03 16:08 ` dominiq at lps dot ens.fr
2015-09-03 20:35 ` fxcoudert at gcc dot gnu.org
` (35 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-09-03 16:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 66291, which changed state.
Bug 66291 Summary: [OOP] Incorrect compile time warning for final procedure in gfortran
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66291
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (31 preceding siblings ...)
2015-09-03 16:08 ` dominiq at lps dot ens.fr
@ 2015-09-03 20:35 ` fxcoudert at gcc dot gnu.org
2015-09-07 9:54 ` ian_harvey at bigpond dot com
` (34 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2015-09-03 20:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 43849, which changed state.
Bug 43849 Summary: Add _gfortran_finalize function to close down the library
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43849
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WONTFIX
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (32 preceding siblings ...)
2015-09-03 20:35 ` fxcoudert at gcc dot gnu.org
@ 2015-09-07 9:54 ` ian_harvey at bigpond dot com
2015-09-25 20:35 ` mikael at gcc dot gnu.org
` (33 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: ian_harvey at bigpond dot com @ 2015-09-07 9:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 67472, which changed state.
Bug 67472 Summary: Finalizer not invoked for undefined and unreferenced local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67472
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (33 preceding siblings ...)
2015-09-07 9:54 ` ian_harvey at bigpond dot com
@ 2015-09-25 20:35 ` mikael at gcc dot gnu.org
2020-06-01 18:52 ` tkoenig at gcc dot gnu.org
` (32 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-09-25 20:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 55603, which changed state.
Bug 55603 Summary: [F03] Memory leak with scalar allocatable function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55603
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (34 preceding siblings ...)
2015-09-25 20:35 ` mikael at gcc dot gnu.org
@ 2020-06-01 18:52 ` tkoenig at gcc dot gnu.org
2020-06-14 21:27 ` tkoenig at gcc dot gnu.org
` (31 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-06-01 18:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 94361, which changed state.
Bug 94361 Summary: [8/9/10/11 Regression] Memory leak in nested types with final
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94361
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (35 preceding siblings ...)
2020-06-01 18:52 ` tkoenig at gcc dot gnu.org
@ 2020-06-14 21:27 ` tkoenig at gcc dot gnu.org
2020-07-13 20:00 ` dominiq at lps dot ens.fr
` (30 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-06-14 21:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 94109, which changed state.
Bug 94109 Summary: [8/9/10/11 Regression] Memory leak introduced in 8.3.0->8.3.1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94109
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (36 preceding siblings ...)
2020-06-14 21:27 ` tkoenig at gcc dot gnu.org
@ 2020-07-13 20:00 ` dominiq at lps dot ens.fr
2021-11-09 20:57 ` cvs-commit at gcc dot gnu.org
` (29 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-07-13 20:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (37 preceding siblings ...)
2020-07-13 20:00 ` dominiq at lps dot ens.fr
@ 2021-11-09 20:57 ` cvs-commit at gcc dot gnu.org
2022-02-01 14:31 ` pault at gcc dot gnu.org
` (28 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-09 20:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #31 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Bernhard Reutner-Fischer
<aldot@gcc.gnu.org>:
https://gcc.gnu.org/g:8875a92d31329ae52b734683784c4b054839a661
commit r12-5073-g8875a92d31329ae52b734683784c4b054839a661
Author: Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
Date: Fri Oct 12 23:57:21 2018 +0200
Fortran: Fix memory leak in finalization wrappers [PR68800]
If a finalization is not required we created a namespace containing
formal arguments for an internal interface definition but never used
any of these. So the whole sub_ns namespace was not wired up to the
program and consequently was never freed. The fix is to simply not
generate any finalization wrappers if we know that it will be unused.
Note that this reverts back to the original r190869
(8a96d64282ac534cb597f446f02ac5d0b13249cc) handling for this case
by reverting this specific part of r194075
(f1ee56b4be7cc3892e6ccc75d73033c129098e87) for PR fortran/37336.
valgrind summary for e.g.
gfortran.dg/abstract_type_3.f03 and gfortran.dg/abstract_type_4.f03
where ".orig" is pristine trunk and ".mine" contains this fix:
at3.orig.vg:LEAK SUMMARY:
at3.orig.vg- definitely lost: 8,460 bytes in 11 blocks
at3.orig.vg- indirectly lost: 13,288 bytes in 55 blocks
at3.orig.vg- possibly lost: 0 bytes in 0 blocks
at3.orig.vg- still reachable: 572,278 bytes in 2,142 blocks
at3.orig.vg- suppressed: 0 bytes in 0 blocks
at3.orig.vg-
at3.orig.vg-Use --track-origins=yes to see where uninitialised values come
from
at3.orig.vg-ERROR SUMMARY: 38 errors from 33 contexts (suppressed: 0 from
0)
--
at3.mine.vg:LEAK SUMMARY:
at3.mine.vg- definitely lost: 344 bytes in 1 blocks
at3.mine.vg- indirectly lost: 7,192 bytes in 18 blocks
at3.mine.vg- possibly lost: 0 bytes in 0 blocks
at3.mine.vg- still reachable: 572,278 bytes in 2,142 blocks
at3.mine.vg- suppressed: 0 bytes in 0 blocks
at3.mine.vg-
at3.mine.vg-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
at3.mine.vg-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
at4.orig.vg:LEAK SUMMARY:
at4.orig.vg- definitely lost: 13,751 bytes in 12 blocks
at4.orig.vg- indirectly lost: 11,976 bytes in 60 blocks
at4.orig.vg- possibly lost: 0 bytes in 0 blocks
at4.orig.vg- still reachable: 572,278 bytes in 2,142 blocks
at4.orig.vg- suppressed: 0 bytes in 0 blocks
at4.orig.vg-
at4.orig.vg-Use --track-origins=yes to see where uninitialised values come
from
at4.orig.vg-ERROR SUMMARY: 18 errors from 16 contexts (suppressed: 0 from
0)
--
at4.mine.vg:LEAK SUMMARY:
at4.mine.vg- definitely lost: 3,008 bytes in 3 blocks
at4.mine.vg- indirectly lost: 4,056 bytes in 11 blocks
at4.mine.vg- possibly lost: 0 bytes in 0 blocks
at4.mine.vg- still reachable: 572,278 bytes in 2,142 blocks
at4.mine.vg- suppressed: 0 bytes in 0 blocks
at4.mine.vg-
at4.mine.vg-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
at4.mine.vg-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
gcc/fortran/ChangeLog:
2018-10-12 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
PR fortran/68800
* class.c (generate_finalization_wrapper): Do not leak
finalization wrappers if they will not be used.
* expr.c (gfc_free_actual_arglist): Formatting fix.
* gfortran.h (gfc_free_symbol): Pass argument by reference.
(gfc_release_symbol): Likewise.
(gfc_free_namespace): Likewise.
* symbol.c (gfc_release_symbol): Adjust acordingly.
(free_components): Set procedure pointer components
of derived types to NULL after freeing.
(free_tb_tree): Likewise.
(gfc_free_symbol): Set sym to NULL after freeing.
(gfc_free_namespace): Set namespace to NULL after freeing.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (38 preceding siblings ...)
2021-11-09 20:57 ` cvs-commit at gcc dot gnu.org
@ 2022-02-01 14:31 ` pault at gcc dot gnu.org
2022-02-03 13:13 ` pault at gcc dot gnu.org
` (27 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2022-02-01 14:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 70863, which changed state.
Bug 70863 Summary: [F03] Finalization of array of derived type causes segfault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70863
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (39 preceding siblings ...)
2022-02-01 14:31 ` pault at gcc dot gnu.org
@ 2022-02-03 13:13 ` pault at gcc dot gnu.org
2023-03-18 7:56 ` cvs-commit at gcc dot gnu.org
` (26 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2022-02-03 13:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 91648, which changed state.
Bug 91648 Summary: [9/10/11/12 Regression] ICE in generate_finalization_wrapper, at fortran/class.c:2009
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91648
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (40 preceding siblings ...)
2022-02-03 13:13 ` pault at gcc dot gnu.org
@ 2023-03-18 7:56 ` cvs-commit at gcc dot gnu.org
2023-03-18 12:21 ` pault at gcc dot gnu.org
` (25 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-18 7:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #32 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:d7caf313525a46f200d7f5db1ba893f853774aee
commit r13-6747-gd7caf313525a46f200d7f5db1ba893f853774aee
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Sat Mar 18 07:56:23 2023 +0000
Fortran: Fix bugs and missing features in finalization [PR37336]
2023-03-18 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/103854
PR fortran/96122
PR fortran/37336
* class.cc (finalize_component): Include the missing arguments
in the call to the component's finalizer wrapper.
(has_finalizer_component): Do not return true for procedure
pointer components.
(finalizer_insert_packed_call): Remove the redundant argument
in the call to the final subroutine.
(generate_finalization_wrapper): Add support for assumed rank
finalizers.
(gfc_may_be_finalized): New helper function.
* dump-parse-tree.cc (write_proc): Whitespace.
* gfortran.h : Add prototype for gfc_may_be_finalized.
* resolve.cc (resolve_function): Correct derived types that
have an incomplete namespace.
(resolve_where, gfc_resolve_where_code_in_forall,
gfc_resolve_forall_body, gfc_resolve_code): Check that the op
code is still EXEC_ASSIGN. If it is set lhs to must finalize.
(is_finalizable_type): New function.
(generate_component_assignments): Set must_finalize if needed.
(gfc_resolve_finalizers): Error if assumed rank finalizer is
not the only one. Warning on lack of scalar finalizer modified
to account for assumed rank finalizers.
(generate_final_call): New function.
(generate_component_assignments): Enclose the outermost call in
a block to capture automatic deallocation and final calls.
Set must_finalize as required to satisfy the standards. Use an
explicit pointer assignment for pointer components to capture
finalization of the target. Likewise use explicit assignment
for allocatable components. Do not use the temporary copy of
the lhs in defined assignment if the component is allocatable.
Put the temporary in the same namespace as the lhs symbol if
the component may be finalized. Remove the leading assignment
from the expansion of assignment of components that have their
own defined assignment components. Suppress finalization of
assignment of temporary components to the lhs. Make an explicit
final call for the rhs function temporary if it exists.
(gfc_resolve_code): Set must_finalize for assignments with an
array constructor on the rhs.
(gfc_resolve_finalizers): Ensure that an assumed rank finalizer
is the only finalizer for that type and correct the surprising
warning for the lack of a scalar finalizer.
(check_defined_assignments): Handle allocatable components.
(resolve_fl_derived): Set referenced the vtab for use
associated symbols.
(resolve_symbol): Set referenced an unreferenced symbol that
will be finalized.
* trans-array.cc (gfc_trans_array_constructor_value): Add code
to finalize the constructor result. Warn that this feature was
removed in F2018 and that it is suppressed by -std=2018.
(trans_array_constructor): Add finalblock, pass to previous
and apply to loop->post if filled.
(gfc_add_loop_ss_code): Add se finalblock to outer loop post.
(gfc_trans_array_cobounds, gfc_trans_array_bounds): Add any
generated finalization code to the main block.
(structure_alloc_comps): Add boolean argument to suppress
finalization and use it for calls from
gfc_deallocate_alloc_comp_no_caf. Otherwise it defaults to
false.
(gfc_copy_alloc_comp_no_fini): New wrapper for
structure_alloc_comps.
(gfc_alloc_allocatable_for_assignment): Suppress finalization
by setting new arg in call to gfc_deallocate_alloc_comp_no_caf.
(gfc_trans_deferred_array): Use gfc_may_be_finalized and do not
deallocate the components of entities with a leading '_' in the
name that are also marked as artificial.
* trans-array.h : Add the new boolean argument to the prototype
of gfc_deallocate_alloc_comp_no_caf with a default of false.
Add prototype for gfc_copy_alloc_comp_no_fini.
* trans-decl.cc(init_intent_out_dt): Tidy up the code.
* trans-expr.cc (gfc_init_se): Initialize finalblock.
(gfc_conv_procedure_call): Use gfc_finalize_tree_expr to
finalize function results. Replace in-line block for class
results with call to new function.
(gfc_conv_expr): Finalize structure constructors for F2003 and
F2008. Warn that this feature was deleted in F2018 and, unlike
array constructors, is not default. Add array constructor
finalblock to the post block.
(gfc_trans_scalar_assign): Suppress finalization by setting new
argument in call to gfc_deallocate_alloc_comp_no_caf. Add the
finalization blocks to the main block.
(gfc_trans_arrayfunc_assign): Use gfc_assignment_finalizer_call
and ensure that finalization occurs after the evaluation of the
rhs but using the initial value for the lhs. Finalize rhs
function results using gfc_finalize_tree_expr.
(trans_class_assignment, gfc_trans_assignment_1): As previous
function, taking care to order evaluation, assignment and
finalization correctly.
* trans-io.cc (gfc_trans_transfer): Add the final block.
* trans-stmt.cc (gfc_trans_call, gfc_trans_allocate): likewise.
(trans_associate_var): Nullify derived allocatable components
and finalize function targets with defined assignment
components on leaving the block scope.
(trans_allocate): Finalize source expressions, if required,
and set init_expr artificial temporarily to suppress the
finalization in gfc_trans_assignment.
* trans.cc (gfc_add_finalizer_call): Do not finalize the
temporaries generated in type assignment with defined
assignment components.
(gfc_assignment_finalizer_call): New function.
(gfc_finalize_tree_expr): New function.
* trans.h: Add finalblock to gfc_se. Add the prototypes for
gfc_finalize_tree_expr and gfc_assignment_finalizer_call.
gcc/testsuite/
PR fortran/64290
* gfortran.dg/finalize_38.f90 : New test.
* gfortran.dg/finalize_38a.f90 : New test.
* gfortran.dg/allocate_with_source_25.f90 : The number of final
calls goes down from 6 to 4.
* gfortran.dg/associate_25.f90 : Remove the incorrect comment.
* gfortran.dg/auto_dealloc_2.f90 : Change the tree dump expr
but the final count remains the same.
* gfortran.dg/unlimited_polymorphic_8.f90 : Tree dump reveals
foo.1.x rather than foo.0.x
PR fortran/67444
* gfortran.dg/finalize_39.f90 : New test.
PR fortran/67471
* gfortran.dg/finalize_40.f90 : New test.
PR fortran/69298
PR fortran/70863
* gfortran.dg/finalize_41.f90 : New test.
PR fortran/71798
* gfortran.dg/finalize_42.f90 : New test.
PR fortran/80524
* gfortran.dg/finalize_43.f90 : New test.
PR fortran/82996
* gfortran.dg/finalize_44.f90 : New test.
PR fortran/84472
* gfortran.dg/finalize_45.f90 : New test.
PR fortran/88735
PR fortran/93691
* gfortran.dg/finalize_46.f90 : New test.
PR fortran/91316
* gfortran.dg/finalize_47.f90 : New test.
PR fortran/106576
* gfortran.dg/finalize_48.f90 : New test.
PR fortran/37336
* gfortran.dg/finalize_49.f90 : New test.
* gfortran.dg/finalize_50.f90 : New test.
* gfortran.dg/finalize_51.f90 : New test.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (41 preceding siblings ...)
2023-03-18 7:56 ` cvs-commit at gcc dot gnu.org
@ 2023-03-18 12:21 ` pault at gcc dot gnu.org
2023-03-18 12:23 ` pault at gcc dot gnu.org
` (24 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 12:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 59694, which changed state.
Bug 59694 Summary: [F03] no finalization of an unused variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59694
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (42 preceding siblings ...)
2023-03-18 12:21 ` pault at gcc dot gnu.org
@ 2023-03-18 12:23 ` pault at gcc dot gnu.org
2023-03-18 15:22 ` pault at gcc dot gnu.org
` (23 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 12:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 64290, which changed state.
Bug 64290 Summary: [F03] No finalization at deallocation of LHS
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64290
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (43 preceding siblings ...)
2023-03-18 12:23 ` pault at gcc dot gnu.org
@ 2023-03-18 15:22 ` pault at gcc dot gnu.org
2023-03-18 15:25 ` pault at gcc dot gnu.org
` (22 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 15:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 67444, which changed state.
Bug 67444 Summary: [F03] RHS in assignment of polymorphic types not finalized
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67444
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (44 preceding siblings ...)
2023-03-18 15:22 ` pault at gcc dot gnu.org
@ 2023-03-18 15:25 ` pault at gcc dot gnu.org
2023-03-18 15:46 ` pault at gcc dot gnu.org
` (21 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 15:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 67471, which changed state.
Bug 67471 Summary: [F03] Finalizer not invoked for assignment to array section
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67471
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (45 preceding siblings ...)
2023-03-18 15:25 ` pault at gcc dot gnu.org
@ 2023-03-18 15:46 ` pault at gcc dot gnu.org
2023-03-18 15:49 ` pault at gcc dot gnu.org
` (20 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 15:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 69298, which changed state.
Bug 69298 Summary: [OOP] Array finalisers seem to be given the wrong array when the array is a member variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69298
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (46 preceding siblings ...)
2023-03-18 15:46 ` pault at gcc dot gnu.org
@ 2023-03-18 15:49 ` pault at gcc dot gnu.org
2023-03-18 15:53 ` pault at gcc dot gnu.org
` (19 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 15:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 71798, which changed state.
Bug 71798 Summary: [OOP] failure to finalise temporary
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71798
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (47 preceding siblings ...)
2023-03-18 15:49 ` pault at gcc dot gnu.org
@ 2023-03-18 15:53 ` pault at gcc dot gnu.org
2023-03-18 16:00 ` pault at gcc dot gnu.org
` (18 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 15:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 80524, which changed state.
Bug 80524 Summary: [F03] Problematic behaviour with a finalization subroutine in gfortran
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80524
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (48 preceding siblings ...)
2023-03-18 15:53 ` pault at gcc dot gnu.org
@ 2023-03-18 16:00 ` pault at gcc dot gnu.org
2023-03-18 16:19 ` pault at gcc dot gnu.org
` (17 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 16:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 82996, which changed state.
Bug 82996 Summary: ICE and segfault with derived type finalization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82996
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (49 preceding siblings ...)
2023-03-18 16:00 ` pault at gcc dot gnu.org
@ 2023-03-18 16:19 ` pault at gcc dot gnu.org
2023-03-18 17:25 ` pault at gcc dot gnu.org
` (16 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 16:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 88735, which changed state.
Bug 88735 Summary: Nested assignment triggers call of final method for right hand side
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88735
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (50 preceding siblings ...)
2023-03-18 16:19 ` pault at gcc dot gnu.org
@ 2023-03-18 17:25 ` pault at gcc dot gnu.org
2023-03-18 17:28 ` pault at gcc dot gnu.org
` (15 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 17:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 93691, which changed state.
Bug 93691 Summary: Type bound assignment causes too many finalization of derived type when part of other type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93691
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (51 preceding siblings ...)
2023-03-18 17:25 ` pault at gcc dot gnu.org
@ 2023-03-18 17:28 ` pault at gcc dot gnu.org
2023-03-18 17:31 ` pault at gcc dot gnu.org
` (14 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 17:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 96122, which changed state.
Bug 96122 Summary: Segfault when using finalizer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96122
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (52 preceding siblings ...)
2023-03-18 17:28 ` pault at gcc dot gnu.org
@ 2023-03-18 17:31 ` pault at gcc dot gnu.org
2023-03-18 17:34 ` pault at gcc dot gnu.org
` (13 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 17:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 104382, which changed state.
Bug 104382 Summary: Finalization of parent components not compliant with standard
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104382
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (53 preceding siblings ...)
2023-03-18 17:31 ` pault at gcc dot gnu.org
@ 2023-03-18 17:34 ` pault at gcc dot gnu.org
2023-03-18 17:35 ` pault at gcc dot gnu.org
` (12 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 17:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 106576, which changed state.
Bug 106576 Summary: Finalization of temporaries from functions not occuring
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106576
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (54 preceding siblings ...)
2023-03-18 17:34 ` pault at gcc dot gnu.org
@ 2023-03-18 17:35 ` pault at gcc dot gnu.org
2023-04-14 13:59 ` pault at gcc dot gnu.org
` (11 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-03-18 17:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 107914, which changed state.
Bug 107914 Summary: Finalization errors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107914
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (55 preceding siblings ...)
2023-03-18 17:35 ` pault at gcc dot gnu.org
@ 2023-04-14 13:59 ` pault at gcc dot gnu.org
2023-04-14 14:11 ` pault at gcc dot gnu.org
` (10 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-04-14 13:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 65347, which changed state.
Bug 65347 Summary: [F03] Final subroutine not called for function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65347
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (56 preceding siblings ...)
2023-04-14 13:59 ` pault at gcc dot gnu.org
@ 2023-04-14 14:11 ` pault at gcc dot gnu.org
2023-04-14 14:13 ` pault at gcc dot gnu.org
` (9 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-04-14 14:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 84472, which changed state.
Bug 84472 Summary: Missing finalization and memory leak
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84472
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (57 preceding siblings ...)
2023-04-14 14:11 ` pault at gcc dot gnu.org
@ 2023-04-14 14:13 ` pault at gcc dot gnu.org
2023-05-22 6:40 ` trnka at scm dot com
` (8 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-04-14 14:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 91316, which changed state.
Bug 91316 Summary: Derived type finalization failing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91316
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (58 preceding siblings ...)
2023-04-14 14:13 ` pault at gcc dot gnu.org
@ 2023-05-22 6:40 ` trnka at scm dot com
2023-09-29 12:57 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: trnka at scm dot com @ 2023-05-22 6:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Tomáš Trnka <trnka at scm dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |trnka at scm dot com
--- Comment #33 from Tomáš Trnka <trnka at scm dot com> ---
The fix for this seems to break some fairly unsuspecting code on GCC 13, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109684
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (59 preceding siblings ...)
2023-05-22 6:40 ` trnka at scm dot com
@ 2023-09-29 12:57 ` cvs-commit at gcc dot gnu.org
2023-09-29 13:13 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-29 12:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #34 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andre Vehreschild <vehre@gcc.gnu.org>:
https://gcc.gnu.org/g:a680274616ec6b26ccfdcee400ed7f54e341d40c
commit r14-4331-ga680274616ec6b26ccfdcee400ed7f54e341d40c
Author: Andre Vehreschild <vehre@gcc.gnu.org>
Date: Thu Sep 28 09:30:12 2023 +0200
Fortran: Free alloc. comp. in allocated coarrays only.
When freeing allocatable components of an allocatable coarray, add
a check that the coarray is still allocated, before accessing the
components.
This patch adds to PR fortran/37336, but does not fix it completely.
gcc/fortran/ChangeLog:
PR fortran/37336
* trans-array.cc (structure_alloc_comps): Deref coarray.
(gfc_trans_deferred_array): Add freeing of components after
check for allocated coarray.
gcc/testsuite/ChangeLog:
PR fortran/37336
* gfortran.dg/coarray/alloc_comp_6.f90: New test.
* gfortran.dg/coarray/alloc_comp_7.f90: New test.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (60 preceding siblings ...)
2023-09-29 12:57 ` cvs-commit at gcc dot gnu.org
@ 2023-09-29 13:13 ` cvs-commit at gcc dot gnu.org
2023-10-04 7:26 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-29 13:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #35 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Andre Vehreschild
<vehre@gcc.gnu.org>:
https://gcc.gnu.org/g:d9b3269bdccac2db9200303494c4e82f2aeb7bbc
commit r13-7923-gd9b3269bdccac2db9200303494c4e82f2aeb7bbc
Author: Andre Vehreschild <vehre@gcc.gnu.org>
Date: Thu Sep 28 09:30:12 2023 +0200
Fortran: Free alloc. comp. in allocated coarrays only.
When freeing allocatable components of an allocatable coarray, add
a check that the coarray is still allocated, before accessing the
components.
This patch adds to PR fortran/37336, but does not fix it completely.
gcc/fortran/ChangeLog:
PR fortran/37336
* trans-array.cc (structure_alloc_comps): Deref coarray.
(gfc_trans_deferred_array): Add freeing of components after
check for allocated coarray.
gcc/testsuite/ChangeLog:
PR fortran/37336
* gfortran.dg/coarray/alloc_comp_6.f90: New test.
* gfortran.dg/coarray/alloc_comp_7.f90: New test.
(cherry picked from commit 9a63a62dfd73e159f1956e9b04b555c445de4e78)
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (61 preceding siblings ...)
2023-09-29 13:13 ` cvs-commit at gcc dot gnu.org
@ 2023-10-04 7:26 ` cvs-commit at gcc dot gnu.org
2023-10-04 8:22 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-04 7:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #36 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:84284e1c490e9235fca5cb85269ecfcb87eef4f1
commit r14-4390-g84284e1c490e9235fca5cb85269ecfcb87eef4f1
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Wed Oct 4 08:26:35 2023 +0100
Fortran: Alloc comp of non-finalizable type not finalized [PR111674]
2023-10-04 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/37336
PR fortran/111674
* trans-expr.cc (gfc_trans_scalar_assign): Finalize components
on deallocation if derived type is not finalizable.
gcc/testsuite/
PR fortran/37336
PR fortran/111674
* gfortran.dg/allocate_with_source_25.f90: Final count in tree
dump reverts from 4 to original 6.
* gfortran.dg/finalize_38.f90: Add test for fix of PR111674.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (62 preceding siblings ...)
2023-10-04 7:26 ` cvs-commit at gcc dot gnu.org
@ 2023-10-04 8:22 ` cvs-commit at gcc dot gnu.org
2023-10-04 8:24 ` pault at gcc dot gnu.org
` (3 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-04 8:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
--- Comment #37 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:29cd67f93f00cc7a9b08eae4f3e12e67ed568f19
commit r13-7934-g29cd67f93f00cc7a9b08eae4f3e12e67ed568f19
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Wed Oct 4 08:26:35 2023 +0100
Fortran: Alloc comp of non-finalizable type not finalized [PR111674]
2023-10-04 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/37336
PR fortran/111674
* trans-expr.cc (gfc_trans_scalar_assign): Finalize components
on deallocation if derived type is not finalizable.
gcc/testsuite/
PR fortran/37336
PR fortran/111674
* gfortran.dg/allocate_with_source_25.f90: Final count in tree
dump reverts from 4 to original 6.
* gfortran.dg/finalize_38.f90: Add test for fix of PR111674.
(cherry picked from commit 84284e1c490e9235fca5cb85269ecfcb87eef4f1)
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (63 preceding siblings ...)
2023-10-04 8:22 ` cvs-commit at gcc dot gnu.org
@ 2023-10-04 8:24 ` pault at gcc dot gnu.org
2023-11-28 15:39 ` andrewjenner at gcc dot gnu.org
` (2 subsequent siblings)
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2023-10-04 8:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 111674, which changed state.
Bug 111674 Summary: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111674
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (64 preceding siblings ...)
2023-10-04 8:24 ` pault at gcc dot gnu.org
@ 2023-11-28 15:39 ` andrewjenner at gcc dot gnu.org
2024-04-08 11:14 ` vterzi1996 at gmail dot com
2024-11-01 8:03 ` pault at gcc dot gnu.org
67 siblings, 0 replies; 68+ messages in thread
From: andrewjenner at gcc dot gnu.org @ 2023-11-28 15:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 110415, which changed state.
Bug 110415 Summary: (Re)allocation on assignment to allocatable polymorphic variable from allocatable polymorphic function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110415
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (65 preceding siblings ...)
2023-11-28 15:39 ` andrewjenner at gcc dot gnu.org
@ 2024-04-08 11:14 ` vterzi1996 at gmail dot com
2024-11-01 8:03 ` pault at gcc dot gnu.org
67 siblings, 0 replies; 68+ messages in thread
From: vterzi1996 at gmail dot com @ 2024-04-08 11:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Vladimir Terzi <vterzi1996 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vterzi1996 at gmail dot com
--- Comment #38 from Vladimir Terzi <vterzi1996 at gmail dot com> ---
It appears that gfortran-13.1 forgets to finalize an instance in the
initialization using the ALLOCATE statement with SOURCE (e.g.,
`allocate(obj,source=type())`). This behavior differs from the assignment
(e.g., `obj=type()`). The "constructor" was redefined with an interface.
I already created a bug report
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114613), but a person from Stack
Overflow pointed me to this thread.
^ permalink raw reply [flat|nested] 68+ messages in thread
* [Bug fortran/37336] [F03] Finish derived-type finalization
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
` (66 preceding siblings ...)
2024-04-08 11:14 ` vterzi1996 at gmail dot com
@ 2024-11-01 8:03 ` pault at gcc dot gnu.org
67 siblings, 0 replies; 68+ messages in thread
From: pault at gcc dot gnu.org @ 2024-11-01 8:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 112459, which changed state.
Bug 112459 Summary: gfortran -w option causes derived-type finalization at creation time
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112459
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 68+ messages in thread
end of thread, other threads:[~2024-11-01 8:03 UTC | newest]
Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/>
2010-10-26 7:46 ` [Bug fortran/37336] Fortran 2003: Finish derived-type finalization burnus at gcc dot gnu.org
2010-12-02 4:35 ` damian at rouson dot net
2010-12-27 2:04 ` dfranke at gcc dot gnu.org
2012-03-15 17:41 ` w6ws at earthlink dot net
2012-03-18 15:53 ` tkoenig at gcc dot gnu.org
2012-05-07 10:20 ` burnus at gcc dot gnu.org
2012-09-03 6:37 ` burnus at gcc dot gnu.org
2012-09-22 17:08 ` burnus at gcc dot gnu.org
2012-10-26 16:47 ` janus at gcc dot gnu.org
2012-11-27 20:04 ` burnus at gcc dot gnu.org
2012-12-03 8:55 ` burnus at gcc dot gnu.org
2012-12-03 9:01 ` janus at gcc dot gnu.org
2012-12-03 21:14 ` burnus at gcc dot gnu.org
2012-12-05 8:54 ` janus at gcc dot gnu.org
2013-05-28 18:31 ` burnus at gcc dot gnu.org
2013-05-28 18:33 ` burnus at gcc dot gnu.org
2013-05-29 13:23 ` burnus at gcc dot gnu.org
2013-05-29 13:26 ` burnus at gcc dot gnu.org
2013-06-04 10:21 ` burnus at gcc dot gnu.org
2013-06-04 10:27 ` burnus at gcc dot gnu.org
2013-06-08 12:28 ` burnus at gcc dot gnu.org
2013-06-21 21:53 ` burnus at gcc dot gnu.org
2013-07-22 11:01 ` janus at gcc dot gnu.org
2013-07-31 20:43 ` janus at gcc dot gnu.org
2014-01-12 11:12 ` [Bug fortran/37336] [F03] " janus at gcc dot gnu.org
2014-02-08 21:36 ` janus at gcc dot gnu.org
2014-03-15 12:14 ` janus at gcc dot gnu.org
2014-03-18 22:23 ` janus at gcc dot gnu.org
2014-12-15 11:50 ` janus at gcc dot gnu.org
2015-02-15 16:03 ` dominiq at lps dot ens.fr
2015-02-15 16:58 ` sourcery at rouson dot net
2015-09-03 16:08 ` dominiq at lps dot ens.fr
2015-09-03 20:35 ` fxcoudert at gcc dot gnu.org
2015-09-07 9:54 ` ian_harvey at bigpond dot com
2015-09-25 20:35 ` mikael at gcc dot gnu.org
2020-06-01 18:52 ` tkoenig at gcc dot gnu.org
2020-06-14 21:27 ` tkoenig at gcc dot gnu.org
2020-07-13 20:00 ` dominiq at lps dot ens.fr
2021-11-09 20:57 ` cvs-commit at gcc dot gnu.org
2022-02-01 14:31 ` pault at gcc dot gnu.org
2022-02-03 13:13 ` pault at gcc dot gnu.org
2023-03-18 7:56 ` cvs-commit at gcc dot gnu.org
2023-03-18 12:21 ` pault at gcc dot gnu.org
2023-03-18 12:23 ` pault at gcc dot gnu.org
2023-03-18 15:22 ` pault at gcc dot gnu.org
2023-03-18 15:25 ` pault at gcc dot gnu.org
2023-03-18 15:46 ` pault at gcc dot gnu.org
2023-03-18 15:49 ` pault at gcc dot gnu.org
2023-03-18 15:53 ` pault at gcc dot gnu.org
2023-03-18 16:00 ` pault at gcc dot gnu.org
2023-03-18 16:19 ` pault at gcc dot gnu.org
2023-03-18 17:25 ` pault at gcc dot gnu.org
2023-03-18 17:28 ` pault at gcc dot gnu.org
2023-03-18 17:31 ` pault at gcc dot gnu.org
2023-03-18 17:34 ` pault at gcc dot gnu.org
2023-03-18 17:35 ` pault at gcc dot gnu.org
2023-04-14 13:59 ` pault at gcc dot gnu.org
2023-04-14 14:11 ` pault at gcc dot gnu.org
2023-04-14 14:13 ` pault at gcc dot gnu.org
2023-05-22 6:40 ` trnka at scm dot com
2023-09-29 12:57 ` cvs-commit at gcc dot gnu.org
2023-09-29 13:13 ` cvs-commit at gcc dot gnu.org
2023-10-04 7:26 ` cvs-commit at gcc dot gnu.org
2023-10-04 8:22 ` cvs-commit at gcc dot gnu.org
2023-10-04 8:24 ` pault at gcc dot gnu.org
2023-11-28 15:39 ` andrewjenner at gcc dot gnu.org
2024-04-08 11:14 ` vterzi1996 at gmail dot com
2024-11-01 8:03 ` 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).