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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [specification_type_resolution_1.f90] - Blame information for rev 237

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Test of the fix of PR27089, where gfortran was unable to resolve the
3
! type of n_elements_uncommon_with_ in the specification expression on
4
! line 21.
5
!
6
! Test extracted from vec{int}.F90 of tonto.
7
!
8
module test
9
   public    n_elements_uncommon_with_
10
   interface n_elements_uncommon_with_
11
      module procedure n_elements_uncommon_with
12
   end interface
13
contains
14
   pure function n_elements_uncommon_with(x) result(res)
15
      integer(4), dimension(:), intent(in) :: x
16
      integer(4) :: res
17
      res = size (x, 1)
18
   end function
19
   pure function elements_uncommon_with(x) result(res)
20
      integer(4), dimension(:), intent(in) :: x
21
      integer(4), dimension(n_elements_uncommon_with_(x)) :: res
22
      res = x
23
   end function
24
end module test
25
   use test
26
   integer(4) :: z(4)
27
   z = 1
28
   print *, elements_uncommon_with (z)
29
   print *, n_elements_uncommon_with_ (z)
30
end
31
! { dg-final { cleanup-modules "test" } }

powered by: WebSVN 2.1.0

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