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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [common_pointer_1.f90] - Diff between revs 154 and 816

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

Rev 154 Rev 816
! { dg-do run }
! { dg-do run }
! PR13415
! PR13415
! Test pointer variables in common blocks.
! Test pointer variables in common blocks.
subroutine test
subroutine test
  implicit none
  implicit none
  real, pointer :: p(:), q
  real, pointer :: p(:), q
  common /block/ p, q
  common /block/ p, q
  if (any (p .ne. (/1.0, 2.0/)) .or. (q .ne. 42.0)) call abort ()
  if (any (p .ne. (/1.0, 2.0/)) .or. (q .ne. 42.0)) call abort ()
end subroutine
end subroutine
program common_pointer_1
program common_pointer_1
  implicit none
  implicit none
  real, target :: a(2), b
  real, target :: a(2), b
  real, pointer :: x(:), y
  real, pointer :: x(:), y
  common /block/ x, y
  common /block/ x, y
  a = (/1.0, 2.0/)
  a = (/1.0, 2.0/)
  b = 42.0
  b = 42.0
  x=>a
  x=>a
  y=>b
  y=>b
  call test
  call test
end program
end program
 
 

powered by: WebSVN 2.1.0

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