OSDN Git Service

2011-01-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / null_3.f90
1 ! { dg-do compile }
2 ! This checks the fix for PR34813 in which the error at line 17
3 ! was not detected.
4 !
5 ! Contributed by Daniel Franke <dfranke@gcc.gnu.org>
6 !
7 SUBROUTINE kd_tree_init_default()
8   TYPE :: kd_tree_node
9     INTEGER :: dummy
10   END TYPE
11
12   TYPE :: kd_tree
13     TYPE(kd_tree_node) :: root
14   END TYPE
15
16   TYPE(kd_tree)  :: tree
17   tree = kd_tree(null()) ! { dg-error "neither a POINTER nor ALLOCATABLE" }
18 END SUBROUTINE