re PR fortran/40955 (STDCALL attributes are not saved in the .MOD files)
2009-08-13 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/40955 * gfortran.dg/winapi.f90: New test. From-SVN: r150733
This commit is contained in:
parent
3e3877f8bd
commit
525fa3235e
2 changed files with 28 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-08-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/40955
|
||||
* gfortran.dg/winapi.f90: New test.
|
||||
|
||||
2009-08-13 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/40995
|
||||
|
|
23
gcc/testsuite/gfortran.dg/winapi.f90
Normal file
23
gcc/testsuite/gfortran.dg/winapi.f90
Normal file
|
@ -0,0 +1,23 @@
|
|||
! { dg-do run { target *-*-cygwin* *-*-mingw* } }
|
||||
! { dg-options "-lkernel32" }
|
||||
! Test case provided by Dennis Wassel.
|
||||
|
||||
PROGRAM winapi
|
||||
|
||||
USE, INTRINSIC :: iso_c_binding
|
||||
IMPLICIT NONE
|
||||
|
||||
INTERFACE
|
||||
! Specifically select the lstrlenA version for ASCII.
|
||||
FUNCTION lstrlen(string) BIND(C, name = "lstrlenA")
|
||||
USE, INTRINSIC :: iso_c_binding
|
||||
IMPLICIT NONE
|
||||
!GCC$ ATTRIBUTES STDCALL :: lstrlen
|
||||
INTEGER (C_INT) :: lstrlen
|
||||
CHARACTER(KIND=C_CHAR), INTENT(in) :: string(*)
|
||||
END FUNCTION lstrlen
|
||||
END INTERFACE
|
||||
|
||||
IF (lstrlen(C_CHAR_"winapi"//C_NULL_CHAR) /= 6) CALL abort()
|
||||
|
||||
END PROGRAM winapi
|
Loading…
Add table
Reference in a new issue