URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [data_array_1.f90] - Rev 316
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }
! PR32928 DATA statement with array element as initializer is rejected
! Test case by Jerry DeLisle <jvdelisle @gcc.gnu.org>
program chkdata
integer, parameter,dimension(4) :: myint = [ 4,3,2,1 ]
character(3), parameter, dimension(3) :: mychar = [ "abc", "def", "ghi" ]
character(50) :: buffer
integer :: a(5)
character(5) :: c(5)
data a(1:2) / myint(4), myint(2) /
data a(3:5) / myint(1), myint(3), myint(1) /
data c / mychar(1), mychar(2), mychar(3), mychar(1), mychar(2) /
buffer = ""
if (any(a.ne.[1,3,4,2,4])) call abort
write(buffer,'(5(a))')c
if (buffer.ne."abc def ghi abc def ") call abort
end program chkdata
Go to most recent revision | Compare with Previous | Blame | View Log