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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [repeat_3.f90] - Rev 302

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

! REPEAT intrinsic, test for PR 31304
! We check that REPEAT accepts all kind arguments for NCOPIES
!
! { dg-do run }
program test
  implicit none

  integer(kind=1) i1
  integer(kind=2) i2
  integer(kind=4) i4
  integer(kind=4) i8
  real(kind=8) r
  character(len=2) s1, s2

  i1 = 1 ; i2 = 1 ; i4 = 1 ; i8 = 1
  r = 1
  s1 = '42'
  r = nearest(r,r)

  s2 = repeat(s1,i1)
  if (s2 /= s1) call abort
  s2 = repeat(s1,i2)
  if (s2 /= s1) call abort
  s2 = repeat(s1,i4)
  if (s2 /= s1) call abort
  s2 = repeat(s1,i8)
  if (s2 /= s1) call abort

end program test

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.