5 ! Check for to few elements of the actual argument
6 ! and reject mismatching string lengths for assumed-shape dummies
12 character(len
=4) :: str(2)
13 character(len
=4) :: str2(2,2)
17 call foo(i(8)) ! { dg-warning "too few elements for dummy argument 'a' .3/4." }
19 call foo(j(2,1)) ! { dg-warning "too few elements for dummy argument 'a' .3/4." }
20 call foo(j(1,2)) ! { dg-warning "too few elements for dummy argument 'a' .2/4." }
24 call bar(str(:)(1:2)) ! { dg-warning "too few elements for dummy argument 'c' .4/6." }
25 call bar(str(1:2)(1:1)) ! { dg-warning "too few elements for dummy argument 'c' .2/6." }
26 call bar(str(2)) ! { dg-warning "too few elements for dummy argument 'c' .4/6." }
27 call bar(str(1)(2:1)) ! OK
28 call bar(str2(2,1)(4:1)) ! OK
29 call bar(str2(1,2)(3:4)) ! OK
30 call bar(str2(1,2)(4:4)) ! { dg-warning "too few elements for dummy argument 'c' .5/6." }
36 character(len
=2) :: c(3)
37 ! print '(3a)', ':',c(1),':'
38 ! print '(3a)', ':',c(2),':'
39 ! print '(3a)', ':',c(3),':'
46 character(len
=5), pointer :: c
47 character(len
=5) :: str(5)
48 call foo(c
) ! { dg-warning "Character length mismatch" }
49 call bar(str
) ! { dg-warning "Character length mismatch" }
52 character(len
=3), pointer :: a
55 character(len
=3) :: a(:)