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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Test the patch for PR30081 in which non-generic intrinsic
3
! procedures could not be overloaded by generic interfaces.
4
!
5
! Contributed by Harald Anlauf  
6
!
7
module gfcbug46
8
  interface random_seed
9
     module procedure put_seed
10
  end interface
11
  interface random_number
12
     module procedure random_vector
13
  end interface
14
  type t_t
15
     real :: x(2)
16
  end type t_t
17
contains
18
  subroutine put_seed (n, seed)
19
    integer, intent(inout) :: n
20
    integer, intent(in)    :: seed
21
    call random_seed (size=n)
22
  end subroutine put_seed
23
  subroutine random_vector (t)
24
    type(t_t) :: t
25
    call random_number (t% x)
26
  end subroutine random_vector
27
end module gfcbug46
28
 
29
  use gfcbug46
30
  type(t_t) :: z
31
  integer :: n = 2, seed = 1
32
  call put_seed (n, seed)
33
  call random_number (z)
34
  print *, z
35
end
36
! { dg-final { cleanup-modules "gfcbug46" } }

powered by: WebSVN 2.1.0

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