c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / whole_file_4.f90
blob2dfb33dc7ab4f4f4b3af233ae391f76ce57fb2bd
1 ! { dg-do compile }
2 ! { dg-options "-std=legacy" }
3 ! Tests the fix for PR24886 in which the mismatch between the
4 ! character lengths of the actual and formal arguments of
5 ! 'foo' was not detected.
7 ! Contributed by Uttam Pawar <uttamp@us.ibm.com>
9 subroutine foo(y)
10 character(len=20) :: y
11 y = 'hello world'
12 end
14 program test
15 character(len=10) :: x
16 call foo(x) ! { dg-warning "actual argument shorter" }
17 write(*,*) 'X=',x
18 pause
19 end