2 ! ! { dg-options "-fcheck=recursion" }
3 ! PR 95743 - this used cause a runtime error.
4 ! Test case by Antoine Lemoine
6 program test_recursive_call
10 type(t_tree_node
), dimension(:), allocatable
:: child
14 type(t_tree_node
), allocatable
:: root
17 type(t_tree
), allocatable
:: tree
21 allocate(tree
%root
%child(1))
22 ! If the line below is removed, the code works fine.
23 allocate(tree
%root
%child(1)%child(1))