public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/97024] New: Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper
@ 2020-09-11 18:05 jhaiduce at gmail dot com
2020-09-11 18:13 ` [Bug fortran/97024] " jhaiduce at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jhaiduce at gmail dot com @ 2020-09-11 18:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97024
Bug ID: 97024
Summary: Overriding finalization on polymorphic types triggers
ICE error in generate_finalization_wrapper
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jhaiduce at gmail dot com
Target Milestone: ---
Created attachment 49209
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49209&action=edit
Minimum working example
The attached MWE contains declarations of two derived types, one inheriting
from the other. The child type contains a finalization procedure. An
allocatable object of the parent class is created, and assigned to an object of
the child class. This triggers an internal compiler error.
GCC version: 10.5.1
System type: MacOS 10.14.6
Output from gcc -v:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
GCC command line: gfortran -o test.o -c test.f90
GCC compiler output:
f951: internal compiler error: in generate_finalization_wrapper, at
fortran/class.c:2009
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew-core/issues> for instructions.
Adding -save-temps to the command line produced an empty file named 'test.s'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/97024] Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper
2020-09-11 18:05 [Bug fortran/97024] New: Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper jhaiduce at gmail dot com
@ 2020-09-11 18:13 ` jhaiduce at gmail dot com
2020-09-11 18:16 ` jhaiduce at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jhaiduce at gmail dot com @ 2020-09-11 18:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97024
--- Comment #1 from John Haiducek <jhaiduce at gmail dot com> ---
This bug shows some similarity to 92587 and 82996, but I suspect they are
distinct. 92587 had a much more complicated MWE and the OP was unable to reduce
it to a single file. 82996 did not involve class polymorphism, which seems to
be required to trigger this bug. Someone with better knowledge of the compiler
might be able to identify a common cause however.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/97024] Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper
2020-09-11 18:05 [Bug fortran/97024] New: Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper jhaiduce at gmail dot com
2020-09-11 18:13 ` [Bug fortran/97024] " jhaiduce at gmail dot com
@ 2020-09-11 18:16 ` jhaiduce at gmail dot com
2020-12-02 20:58 ` dominiq at lps dot ens.fr
2022-01-29 8:36 ` pault at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jhaiduce at gmail dot com @ 2020-09-11 18:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97024
--- Comment #2 from John Haiducek <jhaiduce at gmail dot com> ---
For the sake of convenience (so there are links to click) the above-mentioned
bugs were bug 92587 and bug 82996.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/97024] Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper
2020-09-11 18:05 [Bug fortran/97024] New: Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper jhaiduce at gmail dot com
2020-09-11 18:13 ` [Bug fortran/97024] " jhaiduce at gmail dot com
2020-09-11 18:16 ` jhaiduce at gmail dot com
@ 2020-12-02 20:58 ` dominiq at lps dot ens.fr
2022-01-29 8:36 ` pault at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-12-02 20:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97024
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2020-12-02
Status|UNCONFIRMED |WAITING
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed from GCC9 up to trunk.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/97024] Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper
2020-09-11 18:05 [Bug fortran/97024] New: Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper jhaiduce at gmail dot com
` (2 preceding siblings ...)
2020-12-02 20:58 ` dominiq at lps dot ens.fr
@ 2022-01-29 8:36 ` pault at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu.org @ 2022-01-29 8:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97024
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu.org
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #3)
> Confirmed from GCC9 up to trunk.
I am completely unable to reproduce the ICE on FC13/x86_64 with GNU Fortran
(GCC) 9.3.1 20210315 through to mainline 12.0.1 20220119 (experimental).
module m
type::t1
end type t1
type,extends(t1)::t2
contains
final::t2_finalize
end type t2
contains
subroutine t2_finalize(this)
type(t2)::this
print *, "finalize"
end subroutine t2_finalize
subroutine err()
class(t1),allocatable::o1
type(t2)::o2
o1=o2
end subroutine err
end module m
use m
call err
end
produces the expected output ("finalize" twice).
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-29 8:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 18:05 [Bug fortran/97024] New: Overriding finalization on polymorphic types triggers ICE error in generate_finalization_wrapper jhaiduce at gmail dot com
2020-09-11 18:13 ` [Bug fortran/97024] " jhaiduce at gmail dot com
2020-09-11 18:16 ` jhaiduce at gmail dot com
2020-12-02 20:58 ` dominiq at lps dot ens.fr
2022-01-29 8:36 ` 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).