nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / hollerith6.f90
blob2464f5640ccefc4f74e015fc1fc2fe0f2a5839e5
1 ! PR fortran/39865
2 ! { dg-do run }
4 subroutine foo (a)
5 integer(kind=4) :: a(1, 3)
6 character(len=40) :: t
7 write (t, fmt=a(1,2)) 1, 2, 3, 4, 5, 6, 7, 8
8 if (t .ne. ' 1 2 3 4 5 6 7 8') STOP 1
9 end subroutine foo
10 interface
11 subroutine foo (a)
12 integer(kind=4) :: a(1, 3)
13 end subroutine foo
14 end interface
15 integer(kind=4) :: b(1,3)
16 character(len=40) :: t
17 b(1,1) = 4HXXXX
18 b(1,2) = 4H (8I
19 b(1,3) = 2H4)
20 write (t, fmt=b(1,2)) 1, 2, 3, 4, 5, 6, 7, 8
21 if (t .ne. ' 1 2 3 4 5 6 7 8') STOP 2
22 call foo (b)
23 end
25 ! { dg-warning "Non-character in FORMAT tag" "FMT" { target *-*-* } 7 }
26 ! { dg-warning "Non-character in FORMAT tag" "FMT" { target *-*-* } 20 }
28 ! { dg-warning "Hollerith constant" "const" { target *-*-* } 17 }
29 ! { dg-warning "Conversion" "conversion" { target *-*-* } 17 }
31 ! { dg-warning "Hollerith constant" "const" { target *-*-* } 18 }
32 ! { dg-warning "Conversion" "conversion" { target *-*-* } 18 }
34 ! { dg-warning "Hollerith constant" "const" { target *-*-* } 19 }
35 ! { dg-warning "Conversion" "conversion" { target *-*-* } 19 }