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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [string_3.f90] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do compile }
!
subroutine foo(i)
  implicit none
  integer, intent(in) :: i
  character(len=i) :: s

  s = ''
  print *, s(1:2_8**32_8+3_8) ! { dg-error "too large" }
  print *, s(2_8**32_8+3_8:2_8**32_8+4_8) ! { dg-error "too large" }
  print *, len(s(1:2_8**32_8+3_8)) ! { dg-error "too large" }
  print *, len(s(2_8**32_8+3_8:2_8**32_8+4_8)) ! { dg-error "too large" }

  print *, s(2_8**32_8+3_8:1)
  print *, s(2_8**32_8+4_8:2_8**32_8+3_8)
  print *, len(s(2_8**32_8+3_8:1))
  print *, len(s(2_8**32_8+4_8:2_8**32_8+3_8))

end subroutine

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.