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/] [spread_init_expr.f03] - Rev 302

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

! { dg-do "run" }

  INTEGER, PARAMETER :: n = 5
  INTEGER, PARAMETER :: a1(n) = SPREAD(1, 1, n)
  INTEGER, PARAMETER :: a2(n, 3) = SPREAD([1,2,3], DIM=1, NCOPIES=n)
  INTEGER, PARAMETER :: a3(3, n) = SPREAD([1,2,3], DIM=2, NCOPIES=n)

  IF (ANY(a1 /= [ 1, 1, 1, 1, 1 ])) CALL abort()

  IF (ANY(a2(:, 1) /= 1)) CALL abort()
  IF (ANY(a2(:, 2) /= 2)) CALL abort()
  IF (ANY(a2(:, 3) /= 3)) CALL abort()

  IF (ANY(a3(1, :) /= 1)) CALL abort()
  IF (ANY(a3(2, :) /= 2)) CALL abort()
  IF (ANY(a3(3, :) /= 3)) CALL abort()
END

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.