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:
Jerry DeLisle 2009-08-14 02:35:32 +00:00
parent 3e3877f8bd
commit 525fa3235e
2 changed files with 28 additions and 0 deletions

View file

@ -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

View 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