coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / widechar_IO_1.f90
blob0fe479cda64917a66524633cbf9acb60180a9048
1 ! { dg-do run }
2 ! Wide chracter I/O test 1, formatted and mixed kind
3 ! Test case developed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
4 program test1
5 integer, parameter :: k4 = 4
6 character(len=10,kind=4) :: wide
7 character(len=10,kind=1) :: thin
8 character(kind=1,len=25) :: buffer
9 wide=k4_"Goodbye!"
10 thin="Hello!"
11 write(buffer, '(a)') wide
12 if (buffer /= "Goodbye!") call abort
13 open(10, form="formatted", access="stream", status="scratch")
14 write(10, '(a)') thin
15 rewind(10)
16 read(10, '(a)') wide
17 if (wide /= k4_"Hello!") call abort
18 write(buffer,*) thin, ">",wide,"<"
19 if (buffer /= " Hello! >Hello! <") call abort
20 end program test1