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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! Tests the fix for PR24519, in which assignments with the same
3
! range of an assumed shape array, on the lhs and rhs, would be
4
! treated as causing a dependency.
5
!
6
! Contributed by Paul.Thomas  
7
!
8
  integer, parameter :: n = 100
9
  real :: x(n, n), v
10
  x = 1
11
  v = 0.1
12
  call foo (x, v)
13
  if (abs(sum (x) -  91.10847) > 1e-3) print *, sum (x)
14
contains
15
  subroutine foo (b, d)
16
    real :: b(:, :)
17
    real :: temp(n), c, d
18
    integer :: j, k
19
    do k = 1, n
20
      temp = b(:,k)
21
      do j = 1, n
22
        c = b(k,j)*d
23
        b(:,j) = b(:,j)-temp*c  ! This was the offending assignment.
24
        b(k,j) = c
25
      end do
26
    end do
27
  end subroutine foo
28
end

powered by: WebSVN 2.1.0

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