public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104272] New: finalizer gets called during allocate
@ 2022-01-28 18:40 kai.germaschewski at gmail dot com
  2023-04-02 20:12 ` [Bug fortran/104272] " anlauf at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: kai.germaschewski at gmail dot com @ 2022-01-28 18:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104272
           Summary: finalizer gets called during allocate
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kai.germaschewski at gmail dot com
  Target Milestone: ---

Created attachment 52310
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52310&action=edit
reproducer

This issue appears to be present in gfortran-9,10,11. A minimal reproducer is
provided.

I have an abstract base class, from which one class is derived which itself is
further derived one more time. When allocating an array of the most-derived
type, for some reason the finalizer of the intermediate class is called. This
does not happen with ifort or xlf, and I don't think it should happen.

output:

 allocating
 solver_gpu_final    <-- this being called is a bug (IMHO)
 allocating done
 solver_sparse_gpu_final
 solver_sparse_gpu_final
 solver_gpu_final
 solver_gpu_final

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

end of thread, other threads:[~2023-04-14 13:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 18:40 [Bug fortran/104272] New: finalizer gets called during allocate kai.germaschewski at gmail dot com
2023-04-02 20:12 ` [Bug fortran/104272] " anlauf at gcc dot gnu.org
2023-04-03 16:17 ` pault at gcc dot gnu.org
2023-04-03 16:28 ` pault at gcc dot gnu.org
2023-04-05  6:29 ` pault at gcc dot gnu.org
2023-04-05 13:26 ` kai.germaschewski at gmail dot com
2023-04-14 10:15 ` cvs-commit at gcc dot gnu.org
2023-04-14 13:41 ` 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).