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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [value_6.f03] - Blame information for rev 862

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! Verify by-value passing of character arguments w/in Fortran to a bind(c)
3
! procedure.
4
! PR fortran/32732
5
module pr32732
6
  use, intrinsic :: iso_c_binding, only: c_char
7
  implicit none
8
contains
9
  subroutine test(a) bind(c)
10
    character(kind=c_char), value :: a
11
    call test2(a)
12
  end subroutine test
13
  subroutine test2(a) bind(c)
14
    character(kind=c_char), value :: a
15
    if(a /= c_char_'a') call abort ()
16
    print *, 'a=',a
17
  end subroutine test2
18
end module pr32732
19
 
20
program main
21
  use pr32732
22
  implicit none
23
  call test('a')
24
end program main
25
! { dg-final { cleanup-modules "pr32732" } }

powered by: WebSVN 2.1.0

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