URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [char_pointer_assign_5.f90] - Rev 302
Compare with Previous | Blame | View Log
! { 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
call bar((/ s1, s1 /))
contains
subroutine bar(s)
character(len=*),target :: s(2)
character(len=17),pointer :: p(:)
p => s
end subroutine bar
end program ptr
! { dg-output "Unequal character lengths \\(17/10\\)" }