OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [derived_pointer_null_1.f90] - Diff between revs 302 and 384

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! { dg-options "-std=gnu" }
! { dg-options "-std=gnu" }
!
!
! Test of fix (patch unknown) for pr19181 and pr21300. This test is based
! Test of fix (patch unknown) for pr19181 and pr21300. This test is based
! on the example given in 21300.  Note that this can be executed.
! on the example given in 21300.  Note that this can be executed.
!
!
! Contributed by Paul Thomas  
! Contributed by Paul Thomas  
!
!
  TYPE ast_obs
  TYPE ast_obs
    real, DIMENSION(:), POINTER :: geopos
    real, DIMENSION(:), POINTER :: geopos
  END TYPE ast_obs
  END TYPE ast_obs
  TYPE(ast_obs), PARAMETER    :: undefined_ast_obs = AST_OBS(NULL())
  TYPE(ast_obs), PARAMETER    :: undefined_ast_obs = AST_OBS(NULL())
  type(ast_obs)               :: my_ast_obs
  type(ast_obs)               :: my_ast_obs
  real, target, dimension(10) :: rt
  real, target, dimension(10) :: rt
  my_ast_obs%geopos => rt
  my_ast_obs%geopos => rt
  if (.not.associated (my_ast_obs%geopos)) call abort ()
  if (.not.associated (my_ast_obs%geopos)) call abort ()
  call get_null_ast_obs (my_ast_obs)
  call get_null_ast_obs (my_ast_obs)
  if (associated (my_ast_obs%geopos)) call abort ()
  if (associated (my_ast_obs%geopos)) call abort ()
CONTAINS
CONTAINS
  SUBROUTINE get_null_ast_obs (obs1)
  SUBROUTINE get_null_ast_obs (obs1)
    TYPE(ast_obs)  :: obs1
    TYPE(ast_obs)  :: obs1
    obs1 = undefined_ast_obs
    obs1 = undefined_ast_obs
    RETURN
    RETURN
  END SUBROUTINE get_null_ast_obs
  END SUBROUTINE get_null_ast_obs
END
END
 
 

powered by: WebSVN 2.1.0

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