* [Bug fortran/64932] [5.0] ICE on module end, gfc_conv_descriptor_data_get
2015-02-04 7:12 [Bug fortran/64932] New: [5.0] ICE on module end, gfc_conv_descriptor_data_get shapero at uw dot edu
@ 2015-02-04 9:27 ` burnus at gcc dot gnu.org
2015-02-07 10:57 ` [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer jakub at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-02-04 9:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-02-04
CC| |burnus at gcc dot gnu.org
Known to work| |4.7.2, 4.8.2
Ever confirmed|0 |1
Known to fail| |5.0
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Reduced test case:
module coo_graphs
implicit none
type :: dynamic_array
integer :: length, capacity, min_capacity
integer, allocatable :: array(:)
end type
type :: coo_graph
type(dynamic_array) :: edges(2)
integer, private :: ne
end type coo_graph
contains
subroutine coo_dump_edges(g, edges)
class(coo_graph), intent(in) :: g
integer, intent(out) :: edges(:,:)
end subroutine coo_dump_edges
end module coo_graphs
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer
2015-02-04 7:12 [Bug fortran/64932] New: [5.0] ICE on module end, gfc_conv_descriptor_data_get shapero at uw dot edu
2015-02-04 9:27 ` [Bug fortran/64932] " burnus at gcc dot gnu.org
@ 2015-02-07 10:57 ` jakub at gcc dot gnu.org
2015-02-07 11:23 ` pault at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-07 10:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
CC| |jakub at gcc dot gnu.org
Summary|[4.9/5.0 Regression] ICE in |[4.9/5 Regression] ICE in
|gfc_conv_descriptor_data_ge |gfc_conv_descriptor_data_ge
|t for generated finalizer |t for generated finalizer
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer
2015-02-04 7:12 [Bug fortran/64932] New: [5.0] ICE on module end, gfc_conv_descriptor_data_get shapero at uw dot edu
2015-02-04 9:27 ` [Bug fortran/64932] " burnus at gcc dot gnu.org
2015-02-07 10:57 ` [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer jakub at gcc dot gnu.org
@ 2015-02-07 11:23 ` pault at gcc dot gnu.org
2015-02-08 15:58 ` paul.richard.thomas at gmail dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2015-02-07 11:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org
--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 34691
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34691&action=edit
Patch for the PR
class.c(finalize_component) is not able to deal correctly with non-allocatable
derived type array components that have finalizable components. Rather than
generating loops in finalize_component, I detected the condition in
trans-stmt.c(gfc_trans_deallocate) and have called gfc_deallocate_alloc_comp
after obtaining the derived type for the array.
Happily, this fix does not generate the error:
Error: Two or more part references with nonzero rank must not be specified at
(1)
which occurs if the code is written explicitly.
Bootstraps and regtests on FC21/x_86_64
OK for trunk?
Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer
2015-02-04 7:12 [Bug fortran/64932] New: [5.0] ICE on module end, gfc_conv_descriptor_data_get shapero at uw dot edu
` (2 preceding siblings ...)
2015-02-07 11:23 ` pault at gcc dot gnu.org
@ 2015-02-08 15:58 ` paul.richard.thomas at gmail dot com
2015-02-12 19:31 ` pault at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paul.richard.thomas at gmail dot com @ 2015-02-08 15:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
--- Comment #4 from paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> ---
Dear All,
It would be nice to commit this tonight, if possible. An impetus to do
this is added by Dominique pointing out that it fixes PRs 59765, 60529
and 61766!
Cheers
Paul
On 7 February 2015 at 12:23, pault at gcc dot gnu.org
<gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
>
> Paul Thomas <pault at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |pault at gcc dot gnu.org
> Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org
>
> --- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
> Created attachment 34691
> --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34691&action=edit
> Patch for the PR
>
> class.c(finalize_component) is not able to deal correctly with non-allocatable
> derived type array components that have finalizable components. Rather than
> generating loops in finalize_component, I detected the condition in
> trans-stmt.c(gfc_trans_deallocate) and have called gfc_deallocate_alloc_comp
> after obtaining the derived type for the array.
>
> Happily, this fix does not generate the error:
> Error: Two or more part references with nonzero rank must not be specified at
> (1)
>
> which occurs if the code is written explicitly.
>
> Bootstraps and regtests on FC21/x_86_64
>
> OK for trunk?
>
> Paul
>
> --
> 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] 10+ messages in thread
* [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer
2015-02-04 7:12 [Bug fortran/64932] New: [5.0] ICE on module end, gfc_conv_descriptor_data_get shapero at uw dot edu
` (3 preceding siblings ...)
2015-02-08 15:58 ` paul.richard.thomas at gmail dot com
@ 2015-02-12 19:31 ` pault at gcc dot gnu.org
2015-02-12 21:07 ` pault at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2015-02-12 19:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Thu Feb 12 19:30:53 2015
New Revision: 220654
URL: https://gcc.gnu.org/viewcvs?rev=220654&root=gcc&view=rev
Log:
2015-02-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/64932
* trans-stmt.c (gfc_trans_deallocate): If a component array
expression is not a descriptor type and it is a derived type
that has allocatable components and is not finalizable, then
deallocate the allocatable components.
2015-02-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/64932
* gfortran.dg/finalize_28.f90: New test
Added:
trunk/gcc/testsuite/gfortran.dg/finalize_28.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer
2015-02-04 7:12 [Bug fortran/64932] New: [5.0] ICE on module end, gfc_conv_descriptor_data_get shapero at uw dot edu
` (4 preceding siblings ...)
2015-02-12 19:31 ` pault at gcc dot gnu.org
@ 2015-02-12 21:07 ` pault at gcc dot gnu.org
2015-02-12 21:08 ` pault at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2015-02-12 21:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Thu Feb 12 21:06:41 2015
New Revision: 220659
URL: https://gcc.gnu.org/viewcvs?rev=220659&root=gcc&view=rev
Log:
2015-02-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/64932
* trans-stmt.c (gfc_trans_deallocate): If a component array
expression is not a descriptor type and it is a derived type
that has allocatable components and is not finalizable, then
deallocate the allocatable components.
2015-02-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/64932
* gfortran.dg/finalize_28.f90: New test
Added:
branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/finalize_28.f90
Modified:
branches/gcc-4_9-branch/gcc/fortran/ChangeLog
branches/gcc-4_9-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer
2015-02-04 7:12 [Bug fortran/64932] New: [5.0] ICE on module end, gfc_conv_descriptor_data_get shapero at uw dot edu
` (5 preceding siblings ...)
2015-02-12 21:07 ` pault at gcc dot gnu.org
@ 2015-02-12 21:08 ` pault at gcc dot gnu.org
2015-02-13 5:29 ` shapero at uw dot edu
2015-03-26 10:55 ` dominiq at lps dot ens.fr
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2015-02-12 21:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Paul Thomas <pault at gcc dot gnu.org> ---
Fixed on 4.9 and 5.0.
Thanks for the report.
Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer
2015-02-04 7:12 [Bug fortran/64932] New: [5.0] ICE on module end, gfc_conv_descriptor_data_get shapero at uw dot edu
` (6 preceding siblings ...)
2015-02-12 21:08 ` pault at gcc dot gnu.org
@ 2015-02-13 5:29 ` shapero at uw dot edu
2015-03-26 10:55 ` dominiq at lps dot ens.fr
8 siblings, 0 replies; 10+ messages in thread
From: shapero at uw dot edu @ 2015-02-13 5:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
--- Comment #8 from Daniel Shapero <shapero at uw dot edu> ---
Everything works now, thanks Paul!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer
2015-02-04 7:12 [Bug fortran/64932] New: [5.0] ICE on module end, gfc_conv_descriptor_data_get shapero at uw dot edu
` (7 preceding siblings ...)
2015-02-13 5:29 ` shapero at uw dot edu
@ 2015-03-26 10:55 ` dominiq at lps dot ens.fr
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-03-26 10:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mandrew9 at vt dot edu
--- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
*** Bug 65571 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread