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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fno-inline" }
3
!
4
! PR fortran/46937
5
!
6
! Check that a non-pointer INTENT(IN) dummy
7
! with pointer component is properly treated
8
!
9
program test
10
 type myT
11
   integer, pointer :: point
12
 end type myT
13
 type(myT) :: t2
14
 allocate(t2%point)
15
 t2%point = 42
16
 call nonpointer(t2)
17
 if(t2%point /= 7) call abort()
18
 t2%point = 42
19
 call nonpointer2(t2)
20
 if(t2%point /= 66) call abort()
21
contains
22
  subroutine nonpointer(t)
23
     type(myT), intent(in) :: t
24
     t%point = 7
25
  end subroutine nonpointer
26
  subroutine nonpointer2(t)
27
     class(myT), intent(in) :: t
28
     t%point = 66
29
  end subroutine nonpointer2
30
end program

powered by: WebSVN 2.1.0

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