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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

! { dg-do compile }
!
program test

  print *, char(255)
  print *, achar(255)
  print *, char(255,kind=1)
  print *, achar(255,kind=1)
  print *, char(255,kind=4)
  print *, achar(255,kind=4)

  print *, char(0)
  print *, achar(0)
  print *, char(0,kind=1)
  print *, achar(0,kind=1)
  print *, char(0,kind=4)
  print *, achar(0,kind=4)

  print *, char(297) ! { dg-error "too large for the collating sequence" }
  print *, achar(297) ! { dg-error "too large for the collating sequence" }
  print *, char(297,kind=1) ! { dg-error "too large for the collating sequence" }
  print *, achar(297,kind=1) ! { dg-error "too large for the collating sequence" }
  print *, char(297,kind=4)
  print *, achar(297,kind=4)

  print *, char(-1) ! { dg-error "negative" }
  print *, achar(-1) ! { dg-error "negative" }
  print *, char(-1,kind=1) ! { dg-error "negative" }
  print *, achar(-1,kind=1) ! { dg-error "negative" }
  print *, char(-1,kind=4) ! { dg-error "negative" }
  print *, achar(-1,kind=4) ! { dg-error "negative" }

  print *, char(huge(0_8)) ! { dg-error "too large for the collating sequence" }
  print *, achar(huge(0_8)) ! { dg-error "too large for the collating sequence" }
  print *, char(huge(0_8),kind=1) ! { dg-error "too large for the collating sequence" }
  print *, achar(huge(0_8),kind=1) ! { dg-error "too large for the collating sequence" }
  print *, char(huge(0_8),kind=4) ! { dg-error "too large for the collating sequence" }
  print *, achar(huge(0_8),kind=4) ! { dg-error "too large for the collating sequence" }

  print *, char(z'FFFFFFFF', kind=4)
  print *, achar(z'FFFFFFFF', kind=4)
  print *, char(z'100000000', kind=4) ! { dg-error "too large for the collating sequence" }
  print *, achar(z'100000000', kind=4) ! { dg-error "too large for the collating sequence" }

end program test

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.