Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/char_pointer_assign_4.f90 @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
! { dg-do run } ! { dg-options "-fbounds-check" } ! { dg-shouldfail "Unequal character length" } ! PR fortran/31822 ! Verify that runtime checks for matching character length ! in pointer assignment work. ! Contributed by Tobias Burnus <burnus@gcc.gnu.org> program ptr implicit none character(len=10), target :: s1 character(len=5), pointer :: p1 integer, volatile :: i i = 8 p1 => s1(1:i) end program ptr ! { dg-output "Unequal character lengths \\(5/8\\)" }