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'

Reply via email to