[Bug fortran/107362] New: Segfault for recursive class
baradi09 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Oct 23 08:38:02 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107362
Bug ID: 107362
Summary: Segfault for recursive class
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: baradi09 at gmail dot com
Target Milestone: ---
When trying to build Fortuno (https://github.com/aradi/fortuno), our new
Fortran unit testing system, I encounter a segfault with GFortran. The problem
can be reduced to the following MWE:
[details: failureinfo.f90]
module fortuno_failureinfo
implicit none
type :: failure_info
class(failure_info), allocatable :: previous
end type failure_info
end module fortuno_failureinfo
[/details]
> gfortran -freport-bug -c failureinfo.f90
gfortran: internal compiler error: Segmentation fault signal terminated program
f951
Please submit a full bug report, with preprocessed source.
See <https://github.com/conda-forge/ctng-compilers-feedstock/issues/new/choose>
for instructions.
Apparently, the problem is the "class(failure_info)" field within the derived
type. Turning it into "type(failure_info)" allows compilation.
I use GNU Fortran (conda-forge gcc 12.2.0-18) 12.2.0 on x86_64/Linux.
Thanks a lot for having a look at it in advance!
More information about the Gcc-bugs
mailing list