OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [value_6.f03] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do run }
! { dg-do run }
! Verify by-value passing of character arguments w/in Fortran to a bind(c)
! Verify by-value passing of character arguments w/in Fortran to a bind(c)
! procedure.
! procedure.
! PR fortran/32732
! PR fortran/32732
module pr32732
module pr32732
  use, intrinsic :: iso_c_binding, only: c_char
  use, intrinsic :: iso_c_binding, only: c_char
  implicit none
  implicit none
contains
contains
  subroutine test(a) bind(c)
  subroutine test(a) bind(c)
    character(kind=c_char), value :: a
    character(kind=c_char), value :: a
    call test2(a)
    call test2(a)
  end subroutine test
  end subroutine test
  subroutine test2(a) bind(c)
  subroutine test2(a) bind(c)
    character(kind=c_char), value :: a
    character(kind=c_char), value :: a
    if(a /= c_char_'a') call abort ()
    if(a /= c_char_'a') call abort ()
    print *, 'a=',a
    print *, 'a=',a
  end subroutine test2
  end subroutine test2
end module pr32732
end module pr32732
program main
program main
  use pr32732
  use pr32732
  implicit none
  implicit none
  call test('a')
  call test('a')
end program main
end program main
! { dg-final { cleanup-modules "pr32732" } }
! { 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.