public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/111674] New: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type
@ 2023-10-03 10:06 pault at gcc dot gnu.org
2023-10-03 10:11 ` [Bug fortran/111674] " pault at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: pault at gcc dot gnu.org @ 2023-10-03 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111674
Bug ID: 111674
Summary: [13/14 regression] Failure to finalize an allocatable
subobject of a non-finalizable type
Product: gcc
Version: 13.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: pault at gcc dot gnu.org
Target Milestone: ---
Created attachment 56035
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56035&action=edit
Testcase demonstrating the bug
Introduced by r13-6747-gd7caf313525a46f200d7f5db1ba893f853774aee
See the attached testcase, which was developed to check F2018 compliance in the
Chivers/Sleightholme compliance tables.
gfortran correctly determines from 7.5.6.1 that y is not finalizable. However,
following the first paragraph in 7.5.6.3, the component y%aa should be
finalized before deallocation in the second assignment. 12-branch used to do
this but 13-branch and mainline currently do not.
Note, that 12-branch does not finalize x in its second assignment, as it
should.
Fortunately the fix is trivial and will be posted in the first comment.
Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/111674] [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type
2023-10-03 10:06 [Bug fortran/111674] New: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type pault at gcc dot gnu.org
@ 2023-10-03 10:11 ` pault at gcc dot gnu.org
2023-10-03 18:50 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu.org @ 2023-10-03 10:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111674
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-10-03
Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org
--- Comment #1 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 56036
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56036&action=edit
Fix for this PR
I will apply this patch as 'obvious' to both affected branches.
Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/111674] [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type
2023-10-03 10:06 [Bug fortran/111674] New: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type pault at gcc dot gnu.org
2023-10-03 10:11 ` [Bug fortran/111674] " pault at gcc dot gnu.org
@ 2023-10-03 18:50 ` anlauf at gcc dot gnu.org
2023-10-04 7:26 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-10-03 18:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111674
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from anlauf at gcc dot gnu.org ---
(In reply to Paul Thomas from comment #1)
> Created attachment 56036 [details]
> Fix for this PR
>
> I will apply this patch as 'obvious' to both affected branches.
>
> Paul
Hi Paul,
this looks simple and pretty obvious. Go ahead.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/111674] [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type
2023-10-03 10:06 [Bug fortran/111674] New: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type pault at gcc dot gnu.org
2023-10-03 10:11 ` [Bug fortran/111674] " pault at gcc dot gnu.org
2023-10-03 18:50 ` anlauf 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
4 siblings, 0 replies; 6+ 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=111674
--- Comment #3 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] 6+ messages in thread
* [Bug fortran/111674] [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type
2023-10-03 10:06 [Bug fortran/111674] New: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type pault at gcc dot gnu.org
` (2 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
4 siblings, 0 replies; 6+ 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=111674
--- Comment #4 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] 6+ messages in thread
* [Bug fortran/111674] [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type
2023-10-03 10:06 [Bug fortran/111674] New: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type pault at gcc dot gnu.org
` (3 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
4 siblings, 0 replies; 6+ 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=111674
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> ---
Fixed on 13-branch and trunk.
Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-10-04 8:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03 10:06 [Bug fortran/111674] New: [13/14 regression] Failure to finalize an allocatable subobject of a non-finalizable type pault at gcc dot gnu.org
2023-10-03 10:11 ` [Bug fortran/111674] " pault at gcc dot gnu.org
2023-10-03 18:50 ` anlauf 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
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).