summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f03
blob: 0eb9c7a76f6bde6f4b0e688e0e57b7e5ddc3de3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! { dg-do compile }
!
! Tests the fix for PR69566, in which a boolean expression testing a
! the component of a pointer did not check the pointer, resulting in
! the ICE.
!
! Contributed by Janus Weil  <janus@gcc.gnu.org>
!
  print *, associated(return_pointer()) ! ICE
contains
  function return_pointer()
    class(*), pointer :: return_pointer(:)
  end function
end