URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 302 |
Rev 384 |
! { dg-do run }
|
! { dg-do run }
|
! Tests the fix for PR24519, in which assignments with the same
|
! Tests the fix for PR24519, in which assignments with the same
|
! range of an assumed shape array, on the lhs and rhs, would be
|
! range of an assumed shape array, on the lhs and rhs, would be
|
! treated as causing a dependency.
|
! treated as causing a dependency.
|
!
|
!
|
! Contributed by Paul.Thomas
|
! Contributed by Paul.Thomas
|
!
|
!
|
integer, parameter :: n = 100
|
integer, parameter :: n = 100
|
real :: x(n, n), v
|
real :: x(n, n), v
|
x = 1
|
x = 1
|
v = 0.1
|
v = 0.1
|
call foo (x, v)
|
call foo (x, v)
|
if (abs(sum (x) - 91.10847) > 1e-3) print *, sum (x)
|
if (abs(sum (x) - 91.10847) > 1e-3) print *, sum (x)
|
contains
|
contains
|
subroutine foo (b, d)
|
subroutine foo (b, d)
|
real :: b(:, :)
|
real :: b(:, :)
|
real :: temp(n), c, d
|
real :: temp(n), c, d
|
integer :: j, k
|
integer :: j, k
|
do k = 1, n
|
do k = 1, n
|
temp = b(:,k)
|
temp = b(:,k)
|
do j = 1, n
|
do j = 1, n
|
c = b(k,j)*d
|
c = b(k,j)*d
|
b(:,j) = b(:,j)-temp*c ! This was the offending assignment.
|
b(:,j) = b(:,j)-temp*c ! This was the offending assignment.
|
b(k,j) = c
|
b(k,j) = c
|
end do
|
end do
|
end do
|
end do
|
end subroutine foo
|
end subroutine foo
|
end
|
end
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.