view gcc/testsuite/gfortran.dg/finalize_32.f90 @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
!
! PR 79311: [OOP] ICE in generate_finalization_wrapper, at fortran/class.c:1992
!
! Contributed by DIL <liakhdi@ornl.gov>

module tensor_recursive
  implicit none

  type :: tens_signature_t
  contains
    final :: tens_signature_dtor
  end type

  type :: tens_header_t
    type(tens_signature_t) :: signature
  contains
    final :: tens_header_dtor
  end type

contains

  subroutine tens_signature_dtor(this)
    type(tens_signature_t) :: this
  end subroutine

  subroutine tens_header_dtor(this)
    type(tens_header_t) :: this
  end subroutine

end