view gcc/testsuite/gfortran.dg/pr66465.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 }
!
! Tests the fix for PR66465, in which the arguments of the call to
! ASSOCIATED were falsly detected to have different type/kind.
!
! Contributed by Damian Rouson  <damian@sourceryinstitute.org>
!
  interface
     real function HandlerInterface (arg)
       real :: arg
     end
  end interface

  type TextHandlerTestCase
     procedure (HandlerInterface), nopass, pointer :: handlerOut=>null()
  end type

  type(TextHandlerTestCase) this

  procedure (HandlerInterface), pointer :: procPtr=>null()

  print*, associated(procPtr, this%handlerOut)
end