fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / widechar_intrinsics_3.f90
blob7073b893bb3f93511b934a6e5332cf0f48dc6d52
1 ! { dg-do compile }
2 ! { dg-options "-fmax-errors=1000" }
4 program failme
6 integer :: i, array(20)
7 integer(kind=4) :: i4
8 integer(kind=8) :: i8
9 character(kind=1,len=20) :: s1, t1
10 character(kind=4,len=20) :: s4, t4
12 print *, access (s1, t1)
13 print *, access (s1, t4) ! { dg-error "must be of kind" }
14 print *, access (s4, t1) ! { dg-error "must be of kind" }
15 print *, access (s4, t4) ! { dg-error "must be of kind" }
17 print *, chdir (s1)
18 print *, chdir (s4) ! { dg-error "must be of kind" }
20 print *, chmod (s1, t1)
21 print *, chmod (s1, t4) ! { dg-error "must be of kind" }
22 print *, chmod (s4, t1) ! { dg-error "must be of kind" }
23 print *, chmod (s4, t4) ! { dg-error "must be of kind" }
25 print *, fget (s1)
26 print *, fget (s4) ! { dg-error "must be of kind" }
28 print *, fgetc (i, s1)
29 print *, fgetc (i, s4) ! { dg-error "must be of kind" }
31 print *, fput (s1)
32 print *, fput (s4) ! { dg-error "must be of kind" }
34 print *, fputc (i, s1)
35 print *, fputc (i, s4) ! { dg-error "must be of kind" }
37 print *, getcwd (s1)
38 print *, getcwd (s4) ! { dg-error "Type of argument" }
40 print *, hostnm (s1)
41 print *, hostnm (s4) ! { dg-error "must be of kind" }
43 print *, link (s1, t1)
44 print *, link (s1, t4) ! { dg-error "must be of kind" }
45 print *, link (s4, t1) ! { dg-error "must be of kind" }
46 print *, link (s4, t4) ! { dg-error "must be of kind" }
48 print *, lstat (s1, array)
49 print *, lstat (s4, array) ! { dg-error "must be of kind" }
50 print *, stat (s1, array)
51 print *, stat (s4, array) ! { dg-error "must be of kind" }
53 print *, rename (s1, t1)
54 print *, rename (s1, t4) ! { dg-error "must be of kind" }
55 print *, rename (s4, t1) ! { dg-error "must be of kind" }
56 print *, rename (s4, t4) ! { dg-error "must be of kind" }
58 print *, symlnk (s1, t1)
59 print *, symlnk (s1, t4) ! { dg-error "must be of kind" }
60 print *, symlnk (s4, t1) ! { dg-error "must be of kind" }
61 print *, symlnk (s4, t4) ! { dg-error "must be of kind" }
63 print *, system (s1)
64 print *, system (s4) ! { dg-error "Type of argument" }
66 print *, unlink (s1)
67 print *, unlink (s4) ! { dg-error "must be of kind" }
69 end program failme