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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-std=gnu" }
3
!
4
! Test of fix (patch unknown) for pr19181 and pr21300. This test is based
5
! on the example given in 21300.  Note that this can be executed.
6
!
7
! Contributed by Paul Thomas  
8
!
9
  TYPE ast_obs
10
    real, DIMENSION(:), POINTER :: geopos
11
  END TYPE ast_obs
12
 
13
  TYPE(ast_obs), PARAMETER    :: undefined_ast_obs = AST_OBS(NULL())
14
  type(ast_obs)               :: my_ast_obs
15
  real, target, dimension(10) :: rt
16
 
17
  my_ast_obs%geopos => rt
18
  if (.not.associated (my_ast_obs%geopos)) call abort ()
19
 
20
  call get_null_ast_obs (my_ast_obs)
21
  if (associated (my_ast_obs%geopos)) call abort ()
22
 
23
CONTAINS
24
 
25
  SUBROUTINE get_null_ast_obs (obs1)
26
    TYPE(ast_obs)  :: obs1
27
    obs1 = undefined_ast_obs
28
    RETURN
29
  END SUBROUTINE get_null_ast_obs
30
 
31
END
32
 

powered by: WebSVN 2.1.0

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