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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [forall_13.f90] - Blame information for rev 816

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! Tests the fix for PR33686, in which dependencies were not
3
! correctly handled for the assignments below.
4
!
5
! Contributed by Dick Hendrickson on comp.lang.fortran,
6
! " Most elegant syntax for inverting a permutation?" 20071006
7
!
8
! Test the fix for PR36091 as well...
9
! { dg-options "-fbounds-check" }
10
!
11
  integer :: p(4) = (/2,4,1,3/)
12
  forall (i = 1:4) p(p(i)) = i                ! This was the original
13
  if (any (p .ne. (/3,1,4,2/))) call abort ()
14
 
15
  forall (i = 1:4) p(5 - p(i)) = p(5 - i)     ! This is a more complicated version
16
  if (any (p .ne. (/1,2,3,4/))) call abort ()
17
end

powered by: WebSVN 2.1.0

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