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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 39861/39864
4
!
5
! Test cases provided by Dominique d'Humieres 
6
! and Michael Richmond .
7
 
8
module vector_calculus
9
  intrinsic :: dot_product, sqrt
10
 
11
contains
12
 
13
  function len(r)
14
    real, dimension(:), intent(in) :: r
15
    real :: len
16
    len = sqrt(dot_product(r,r))
17
  end function len
18
 
19
  FUNCTION next_state()
20
    INTRINSIC :: RESHAPE
21
    INTEGER, PARAMETER :: trantb(1,1) = RESHAPE((/1,2/), shape=(/1,1/))
22
    next_state = trantb(1, 1)
23
  END FUNCTION next_state
24
 
25
end module vector_calculus
26
 
27
! { dg-final { cleanup-modules "vector_calculus" } }
28
 

powered by: WebSVN 2.1.0

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