annotate gcc/testsuite/gfortran.dg/whole_file_4.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! { dg-options "-fwhole-file -std=legacy" }
kono
parents:
diff changeset
3 ! Tests the fix for PR24886 in which the mismatch between the
kono
parents:
diff changeset
4 ! character lengths of the actual and formal arguments of
kono
parents:
diff changeset
5 ! 'foo' was not detected.
kono
parents:
diff changeset
6 !
kono
parents:
diff changeset
7 ! Contributed by Uttam Pawar <uttamp@us.ibm.com>
kono
parents:
diff changeset
8 !
kono
parents:
diff changeset
9 subroutine foo(y)
kono
parents:
diff changeset
10 character(len=20) :: y
kono
parents:
diff changeset
11 y = 'hello world'
kono
parents:
diff changeset
12 end
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 program test
kono
parents:
diff changeset
15 character(len=10) :: x
kono
parents:
diff changeset
16 call foo(x) ! { dg-warning "actual argument shorter" }
kono
parents:
diff changeset
17 write(*,*) 'X=',x
kono
parents:
diff changeset
18 pause
kono
parents:
diff changeset
19 end