3 ! Check if actual argument is too short
8 character(len
=10), target
:: x
9 character(len
=20), target
:: y
10 character(len
=30), target
:: z
11 character(len
=10), pointer :: ptr1
12 character(len
=20), pointer :: ptr2
13 character(len
=30), pointer :: ptr3
14 character(len
=10), allocatable
:: alloc1(:)
15 character(len
=20), allocatable
:: alloc2(:)
16 character(len
=30), allocatable
:: alloc3(:)
17 call foo(v
) ! { dg-warning "actual argument shorter than of dummy" }
18 call foo(x
) ! { dg-warning "actual argument shorter than of dummy" }
22 call foo(ptr1
) ! { dg-warning "actual argument shorter than of dummy" }
23 call bar(ptr1
) ! { dg-warning "Character length mismatch" }
29 call bar(ptr3
) ! { dg-warning "Character length mismatch" }
33 call arr(alloc1
) ! { dg-warning "Character length mismatch" }
35 call arr(alloc3
) ! { dg-warning "Character length mismatch" }
38 character(len
=20) :: y
42 character(len
=20),pointer :: y
46 character(len
=20),allocatable
:: y(:)
51 ! Remove -Wstringop-overflow warnings.
52 ! { dg-prune-output "overflows the destination" }