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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/40851
4
!
5
! Make sure the an INTENT(OUT) dummy is not initialized
6
! when it is a pointer.
7
!
8
! Contributed by Juergen Reuter .
9
!
10
program main
11
 
12
  type :: string
13
     character,dimension(:),allocatable :: chars
14
  end type string
15
 
16
  type :: string_container
17
     type(string) :: string
18
  end type string_container
19
 
20
  type(string_container), target :: tgt
21
  type(string_container), pointer :: ptr
22
 
23
  ptr => tgt
24
  call set_ptr (ptr)
25
  if (associated(ptr)) call abort()
26
 
27
contains
28
 
29
  subroutine set_ptr (ptr)
30
    type(string_container), pointer, intent(out) :: ptr
31
    ptr => null ()
32
  end subroutine set_ptr
33
 
34
end program main

powered by: WebSVN 2.1.0

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