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

Subversion Repositories openrisc_me

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

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
! { 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.