view gcc/testsuite/gfortran.dg/class_62.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 run }
! { dg-options "-fcheck=recursion" }
!
! PR 80361: [5/6/7 Regression] bogus recursive call to nonrecursive procedure with -fcheck=recursion
!
! Contributed by Jürgen Reuter <juergen.reuter@desy.de>

program main_ut

  implicit none

  type :: prt_spec_expr_t
  end type

  type :: prt_expr_t
     class(prt_spec_expr_t), allocatable :: x
  end type

  type, extends (prt_spec_expr_t) :: prt_spec_list_t
     type(prt_expr_t) :: e
  end type

  class(prt_spec_list_t), allocatable :: y

  allocate (y)
  allocate (prt_spec_list_t :: y%e%x)
  deallocate(y)

end program