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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [char_pointer_dummy.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
program char_pointer_dummy
3
! Test character pointer dummy arguments, required
4
! to fix PR16939 and PR18689
5
! Provided by Paul Thomas pault@gcc.gnu.org
6
  implicit none
7
  character*4                :: c0
8
  character*4, pointer       :: c1
9
  character*4, pointer       :: c2(:)
10
  allocate (c1, c2(1))
11
! Check that we have not broken non-pointer characters.
12
  c0 = "wxyz"
13
  call foo (c0)
14
! Now the pointers
15
  c1 = "wxyz"
16
  call sfoo (c1)
17
  c2 = "wxyz"
18
  call afoo (c2)
19
  deallocate (c1, c2)
20
contains
21
  subroutine foo (cc1)
22
    character*4                :: cc1
23
    if (cc1 /= "wxyz") call abort ()
24
  end subroutine foo
25
  subroutine sfoo (sc1)
26
    character*4, pointer       :: sc1
27
    if (sc1 /= "wxyz") call abort ()
28
  end subroutine sfoo
29
  subroutine afoo (ac1)
30
    character*4, pointer       :: ac1(:)
31
    if (ac1(1) /= "wxyz") call abort ()
32
  end subroutine afoo
33
end program char_pointer_dummy

powered by: WebSVN 2.1.0

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