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

Subversion Repositories openrisc

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

Go to most recent revision | 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\\)" }

Go to most recent revision | 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.