2 ! { dg-add-options ieee }
3 ! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
4 ! PR37077 Implement Internal Unit I/O for character KIND=4
5 ! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
8 character(kind=4,len=44) :: string
10 real(kind=4) :: inf, nan, large
17 string = 4_"123456789x"
18 write(string,'(a11)') 4_"abcdefg"
19 if (string .ne. 4_" abcdefg ") call abort
21 if (string .ne. 4_" 12345 ") call abort
22 write(string, '(i6,5x,i8,a5)') 78932, 123456, "abc"
23 if (string .ne. 4_" 78932 123456 abc ") call abort
24 write(string, *) .true., .false. , .true.
25 if (string .ne. 4_" T F T ") call abort
26 write(string, *) 1.2345e-06, 4.2846e+10_8
27 if (string .ne. 4_" 1.23450002E-06 42846000000.000000 ") call abort
28 write(string, *) nan, inf
29 if (string .ne. 4_" NaN Infinity ") call abort
30 write(string, '(10x,f3.1,3x,f9.1)') nan, inf
31 if (string .ne. 4_" NaN Infinity ") call abort
32 write(string, *) (1.2, 3.4 )
33 if (string .ne. 4_" ( 1.20000005 , 3.40000010 ) ") call abort
34 end program char4_iunit_1