PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / coarray_lib_alloc_2.f90
blob90998ee39aa01ab5b906276aba70ac556d2c0b16
1 ! { dg-do compile }
2 ! { dg-options "-fcoarray=lib -fdump-tree-original" }
4 ! Allocate/deallocate with libcaf.
7 subroutine test()
8 type t
9 end type t
10 class(t), allocatable :: xx[:], yy(:)[:]
11 integer :: stat
12 character(len=200) :: errmsg
13 allocate(xx[*], stat=stat, errmsg=errmsg)
14 allocate(yy(2)[*], stat=stat, errmsg=errmsg)
15 deallocate(xx,yy,stat=stat, errmsg=errmsg)
16 end
18 ! { dg-final { scan-tree-dump-times "_gfortran_caf_register \\(1, 1, &xx._data.token, \\(void \\*\\) &xx._data, &stat.., &errmsg, 200\\);" 1 "original" } }
19 ! { dg-final { scan-tree-dump-times "_gfortran_caf_register \\(1, 1, &yy._data.token, \\(void \\*\\) &yy._data, &stat.., &errmsg, 200\\);" 1 "original" } }
20 ! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister .&xx._data.token, 0, &stat.., &errmsg, 200.;" 1 "original" } }
21 ! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister .&yy._data.token, 0, &stat.., &errmsg, 200.;" 1 "original" } }
22 ! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister .&yy._data.token, 0, 0B, 0B, 0.;" 1 "original" } }
23 ! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister .&xx._data.token, 0, 0B, 0B, 0.;" 1 "original" } }