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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [forall_10.f90] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! { dg-options "-O" }
3
! Tests the fix for PR30400, in which the use of ANY in the
4
! FORALL mask was rejected.
5
!
6
! Contributed by Dominique d'Humieres 
7
!
8
program pr30400_1
9
  real, dimension (5, 5, 5, 5) :: a
10
 
11
  a (:, :, :,  :)  = 4
12
  a (:, 2, :, 4) = 10
13
  a (:, 2, :, 1) = 0
14
 
15
  forall (i = 1:5, j = 1:5, k = 1:5, any (a (i, j, k,  :)  .gt. 6))
16
    forall (l = 1:5, any (a (:, :, :, l) .lt. 2))
17
      a (i, j, k, l) = i - j + k - l
18
    end forall
19
  end forall
20
  if (sum (a) .ne. 2625.0) call abort ()
21
 
22
 ! Check that the fix has not broken the treatment of the '=='
23
  forall (i = 1:5, i == 3) a(i, i, i, i) = -5
24
  if (sum (a) .ne. 2616.0) call abort ()
25
end

powered by: WebSVN 2.1.0

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