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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR tree-optimization/30092
3
! This caused once an ICE due to internal tree changes
4
program test
5
  implicit none
6
  integer, parameter :: N = 30
7
  real, dimension(N) :: rho, pre, cs
8
  real               :: gamma
9
  gamma = 2.1314
10
  rho = 5.0
11
  pre = 3.0
12
  call EOS(N, rho, pre, cs, gamma)
13
  if (abs(CS(1) - sqrt(gamma*pre(1)/rho(1))) > epsilon(cs)) &
14
     call abort()
15
contains
16
      SUBROUTINE EOS(NODES, DENS, PRES, CS, CGAMMA)
17
      IMPLICIT NONE
18
      INTEGER NODES
19
      REAL CGAMMA
20
      REAL, DIMENSION(NODES) :: DENS, PRES, CS
21
      REAL, PARAMETER :: RGAS = 8.314
22
      CS(:NODES) = SQRT(CGAMMA*PRES(:NODES)/DENS(:NODES))
23
      END SUBROUTINE EOS
24
end program test

powered by: WebSVN 2.1.0

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