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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/44646
4
!
5
! DO CONCURRENT
6
!
7
implicit none
8
integer :: i, j
9
integer :: A(5,5)
10
 
11
A = 0.0
12
do concurrent (i=1:5, j=1:5, (i/=j))
13
  if (i == 5) cycle
14
  A(i,j) = i*j
15
end do
16
 
17
if (any (A(:,1) /= [0,  2,  3,  4, 0])) call abort()
18
if (any (A(:,2) /= [2,  0,  6,  8, 0])) call abort()
19
if (any (A(:,3) /= [3,  6,  0, 12, 0])) call abort()
20
if (any (A(:,4) /= [4,  8, 12,  0, 0])) call abort()
21
if (any (A(:,5) /= [5, 10, 15, 20, 0])) call abort()
22
 
23
A = -99
24
 
25
do concurrent (i = 1 : 5)
26
  forall (j=1:4, i/=j)
27
    A(i,j) = i*j
28
  end forall
29
  if (i == 5) then
30
    A(i,i) = -i
31
  end if
32
end do
33
 
34
if (any (A(:,1) /= [-99,   2,   3,   4,  5])) call abort ()
35
if (any (A(:,2) /= [  2, -99,   6,   8, 10])) call abort ()
36
if (any (A(:,3) /= [  3,   6, -99,  12, 15])) call abort ()
37
if (any (A(:,4) /= [  4,   8,  12, -99, 20])) call abort ()
38
if (any (A(:,5) /= [-99, -99, -99, -99, -5])) call abort ()
39
 
40
end

powered by: WebSVN 2.1.0

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