summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/null_3.f90
blob: 141af1f5bcbbc7757fad3dd45ce86d2690336a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do compile }
! This checks the fix for PR34813 in which the error at line 17
! was not detected.
!
! Contributed by Daniel Franke <dfranke@gcc.gnu.org>
!
SUBROUTINE kd_tree_init_default()
  TYPE :: kd_tree_node
    INTEGER :: dummy
  END TYPE

  TYPE :: kd_tree
    TYPE(kd_tree_node) :: root
  END TYPE

  TYPE(kd_tree)  :: tree
  tree = kd_tree(null()) ! { dg-error "neither a POINTER nor ALLOCATABLE" }
END SUBROUTINE