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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [char_pointer_assign_5.f90] - Blame information for rev 399

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! { dg-options "-fbounds-check" }
3
! { dg-shouldfail "Unequal character length" }
4
 
5
! PR fortran/31822
6
! Verify that runtime checks for matching character length
7
! in pointer assignment work.
8
 
9
! Contributed by Tobias Burnus 
10
 
11
program ptr
12
  implicit none
13
  character(len=10), target :: s1
14
  call bar((/ s1, s1 /))
15
contains
16
  subroutine bar(s)
17
    character(len=*),target  :: s(2)
18
    character(len=17),pointer :: p(:)
19
    p => s
20
  end subroutine bar
21
end program ptr
22
 
23
! { dg-output "Unequal character lengths \\(17/10\\)" }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.