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/] [spec_expr_4.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR27709 in which the specification expression on
3
! line 22 was not resolved because of the multiple component references.
4
!
5
! Contributed by David Ham  
6
!
7
module elements
8
  implicit none
9
  type element_type
10
     type(ele_numbering_type), pointer :: numbering
11
  end type element_type
12
  type ele_numbering_type
13
     integer, dimension(:,:), pointer :: number2count
14
  end type ele_numbering_type
15
end module elements
16
module global_numbering
17
  use elements
18
  implicit none
19
contains
20
  function element_local_coords(element) result (coords)
21
    type(element_type), intent(in) :: element
22
    real, dimension(size(element%numbering%number2count, 1)) :: coords
23
    coords=0.0
24
  end function element_local_coords
25
end module global_numbering
26
 
27
  use global_numbering
28
  type (element_type) :: e
29
  type (ele_numbering_type), target :: ent
30
  allocate (ent%number2count (2,2))
31
  e%numbering => ent
32
  print *, element_local_coords (e)
33
end
34
! { dg-final { cleanup-modules "elements global_numbering" } }

powered by: WebSVN 2.1.0

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