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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Tests the fix for PR33370, in which array copying, with subreferences
3
! was broken due to a regression.
4
!
5
! Reported by Thomas Koenig 
6
!
7
program main
8
  type foo
9
    integer :: i
10
     character(len=3) :: c
11
  end type foo
12
  type(foo), dimension(2) :: a = (/foo (1, "uvw"), foo (2, "xyz")/)
13
  type(foo), dimension(2) :: b = (/foo (101, "abc"), foo (102, "def")/)
14
  a%i = 0
15
  print *, a
16
  a%i = (/ 12, 2/)
17
  if (any (a%c .ne. (/"uvw", "xyz"/))) call abort ()
18
  if (any (a%i .ne. (/12, 2/))) call abort ()
19
  a%i = b%i
20
  if (any (a%c .ne. (/"uvw", "xyz"/))) call abort ()
21
  if (any (a%i .ne. (/101, 102/))) call abort ()
22
end program main

powered by: WebSVN 2.1.0

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