1! { dg-do compile }
2! { dg-options "-fwhole-file" }
3! Tests the fix for PR26227 in which the interface mismatches
4! below were not detected.
5!
6! Contributed by Andrew Pinski <pinskia@gcc.gnu.org>
7!
8function a(b)
9REAL ::b
10b = 2.0
11a = 1.0
12end function
13
14program gg
15real :: h
16character (5) :: chr = 'hello'
17h = a(); ! { dg-warning "Missing actual argument" }
18call test ([chr]) ! { dg-warning "Rank mismatch" }
19end program gg
20
21subroutine test (a)
22  character (5) :: a
23  if (a .ne. 'hello') call abort
24end subroutine test
25
26