9 allocate (gain,STAT=all_res)
14 real, pointer :: gain2
15 allocate (gain2,STAT=all_res)
23 integer :: all_res2, func
26 allocate (gain,STAT=all_res2)
31 real, pointer :: gain2
32 allocate (gain2,STAT=all_res2)
37 function func2() result(res)
41 allocate (gain,STAT=func2) ! { dg-error "is not a variable" }
49 integer function func2()
53 integer, parameter :: res = 2
54 allocate (gain,STAT=func2) ! { dg-error "is not a variable" }
62 integer, pointer :: ptr
63 allocate(ptr, stat=one)
64 if(one == 0) deallocate(ptr)
66 allocate(ptr, stat=two)
67 if(associated(ptr)) deallocate(ptr)
71 allocate(p, stat=one) ! { dg-error "is not a variable" }
72 if(associated(p)) deallocate(p)
73 allocate(p, stat=two) ! { dg-error "is not a variable" }
74 if(associated(p)) deallocate(p)