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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [forall_6.f90] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
! Program to test FORALL with scalar pointer assignment inside it.
2
program forall_6
3
  type element
4
    real, pointer :: p
5
  end type
6
 
7
  type (element) q(5)
8
  real, target, dimension(5) :: t
9
  integer i;
10
 
11
  t = (/1.0, 2.0, 3.0, 4.0, 5.0/)
12
 
13
  do i = 1,5
14
    q(i)%p => t(i)
15
  end do
16
 
17
  forall (i = 1:5)
18
    q(i)%p => q(6 - i)%p
19
  end forall
20
 
21
 
22
  do i = 1,5
23
    if (q(i)%p .ne. t(6 - i)) call abort
24
  end do
25
end

powered by: WebSVN 2.1.0

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