2 ! { dg-options "-fdump-tree-original" }
5 ! Check that string lengths of optional arguments are added to the library-call
6 ! even if those arguments are missing.
11 CHARACTER(len
=1) :: vect(4)
12 CHARACTER(len
=1) :: matrix(2, 2)
18 vect
= (/ "w", "x", "y", "z" /)
20 ! Call the affected intrinsics
21 vect
= EOSHIFT (vect
, 2)
22 vect
= PACK (matrix
, matrix
/= "")
23 matrix
= RESHAPE (vect
, (/ 2, 2 /))
27 ! All library function should be called with *two* trailing arguments "1" for
28 ! the string lengths of both the main array and the optional argument:
29 ! { dg-final { scan-tree-dump "_eoshift\[0-9_\]+char \\(\[&a-zA-Z0-9._, \]+, 1, 0\\)" "original" } }
30 ! { dg-final { scan-tree-dump "_reshape\[0-9_\]+char \\(\[&a-zA-Z0-9._, \]+, 1, 0\\)" "original" } }
31 ! { dg-final { scan-tree-dump "_pack\[0-9_\]+char \\(\[&a-zA-Z0-9._, \]+, 1, 0\\)" "original" } }
32 ! { dg-final { cleanup-tree-dump "original" } }