Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/string_3.f90 @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line source
! { dg-do compile } ! { dg-require-effective-target ilp32 } ! 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