lto: Remove random_seed from section name.
[official-gcc.git] / gcc / testsuite / gfortran.dg / compare_interfaces.f90
blobcb2cbb759a64bcafeb8302efc9b7c21159408a43
1 ! { dg-do compile }
3 ! Contributed by Mark Eggleston <mark.eggleston@codethink.co.uk>
5 subroutine f(a, b)
6 integer :: a
7 real :: b
9 write(*,*) a, b
10 end subroutine
12 subroutine g(a, b)
13 integer :: a
14 character(*) :: b
16 write(*,*) a, b
17 end subroutine
19 subroutine h
20 interface
21 subroutine f(a, b) ! { dg-error "\\(CHARACTER\\(\\*\\)/REAL\\(4\\)\\)" }
22 integer :: a
23 character(*) :: b
24 end subroutine
25 subroutine g(a, b) ! { dg-error "\\(REAL\\(4\\)/CHARACTER\\(\\*\\)\\)" }
26 integer :: a
27 real :: b
28 end subroutine
29 end interface
31 call f(6, 6.0)
32 call g(6, "abcdef")
33 end subroutine
35 subroutine f4(a, b)
36 integer :: a
37 real :: b
39 write(*,*) a, b
40 end subroutine
42 subroutine g4(a, b)
43 integer :: a
44 character(*,4) :: b
46 write(*,*) a, b
47 end subroutine
49 subroutine h4
50 interface
51 subroutine f4(a, b) ! { dg-error "\\(CHARACTER\\(\\*,4\\)/REAL\\(4\\)\\)" }
52 integer :: a
53 character(*,4) :: b
54 end subroutine
55 subroutine g4(a, b) ! { dg-error "REAL\\(4\\)/CHARACTER\\(\\*,4\\)" }
56 integer :: a
57 real :: b
58 end subroutine
59 end interface
61 call f4(6, 6.0)
62 call g4(6, 4_"abcdef")
63 end subroutine
65 program test
66 call h
67 call h4
68 end program
70 ! { dg-error "passed REAL\\(4\\) to CHARACTER\\(\\*\\)" "type mismatch" { target \*-\*-\* } 31 }
71 ! { dg-error "passed CHARACTER\\(6\\) to REAL\\(4\\)" "type mismatch" { target \*-\*-\* } 32 }
72 ! { dg-error "passed REAL\\(4\\) to CHARACTER\\(\\*,4\\)" "type mismatch" { target \*-\*-\* } 61 }
73 ! { dg-error "passed CHARACTER\\(6,4\\) to REAL\\(4\\)" "type mismatch" { target \*-\*-\* } 62 }