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

            Bug ID: 84523
           Summary: [8 Regression] Runtime crash deallocating allocatable
                    array within derived type
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gmx dot de
  Target Milestone: ---

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

The attached code crashes when checking allocatable components within
a derived type:

 ### destruct: size(rc% spots)=          80
 ### destruct: allocated (vm) = F

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0xffffe3ff in ???
#1  0x8048a5e in destruct
        at /work/DWD/git/dace_code/gfcbug148.f90:33
#2  0x8048be8 in gfcbug148
        at /work/DWD/git/dace_code/gfcbug148.f90:12
#3  0x8049088 in main
        at /work/DWD/git/dace_code/gfcbug148.f90:13


The program runs without problems with any version 4.8 through 7.2:

 ### destruct: size(rc% spots)=          80
 ### destruct: allocated (vm) = F
 OK

Reply via email to