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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR32928 DATA statement with array element as initializer is rejected
3
! Test case by Jerry DeLisle  
4
program chkdata
5
    integer, parameter,dimension(4) :: myint = [ 4,3,2,1 ]
6
    character(3), parameter, dimension(3) :: mychar = [ "abc", "def", "ghi" ]
7
    character(50) :: buffer
8
    integer :: a(5)
9
    character(5) :: c(5)
10
    data a(1:2) / myint(4), myint(2) /
11
    data a(3:5) / myint(1), myint(3), myint(1) /
12
    data c / mychar(1), mychar(2), mychar(3), mychar(1), mychar(2) /
13
    buffer = ""
14
    if (any(a.ne.[1,3,4,2,4])) call abort
15
    write(buffer,'(5(a))')c
16
    if (buffer.ne."abc  def  ghi  abc  def  ") call abort
17
end program chkdata

powered by: WebSVN 2.1.0

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