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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [common_init_1.f90] - Rev 801

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

! Program to test initialization of common blocks.
subroutine test()
  character(len=15) :: c
  integer d, e
  real f
  common /block2/ c
  common /block/ d, e, f

  if ((d .ne. 42) .or. (e .ne. 43) .or. (f .ne. 2.0)) call abort ()
  if (c .ne. "Hello World    ") call abort ()
end subroutine

program prog
  integer a(2)
  real b
  character(len=15) :: s
  common /block/ a, b
  common /block2/ s
  data b, a/2.0, 42, 43/
  data s /"Hello World"/

  call test ()
end program

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

powered by: WebSVN 2.1.0

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