OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [widechar_IO_2.f90] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Wide chracter I/O test 2, formatted array write and read
3
! Test case developed by Jerry DeLisle 
4
program chkdata
5
    integer, parameter :: k4=4
6
    character(len=7, kind=k4), dimension(3) :: mychar
7
    character(50) :: buffer
8
    mychar(1) = k4_"abc1234"
9
    mychar(2) = k4_"def5678"
10
    mychar(3) = k4_"ghi9012"
11
    buffer = ""
12
    write(buffer,'(3(a))') mychar(2:3), mychar(1)
13
    if (buffer /= "def5678ghi9012abc1234") call abort
14
    write(buffer,'(3(a))') mychar
15
    if (buffer /= "abc1234def5678ghi9012") call abort
16
    mychar = ""
17
    read(buffer,'(3(a))') mychar
18
    if (any(mychar.ne.[ k4_"abc1234",k4_"def5678",k4_"ghi9012" ])) call abort
19
end program chkdata

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.