From: Jerry DeLisle Date: Fri, 14 Aug 2009 02:35:32 +0000 (+0000) Subject: re PR fortran/40955 (STDCALL attributes are not saved in the .MOD files) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=525fa3235ec5f883c89f699198eb8e73dbdc7d82;p=platform%2Fupstream%2Fgcc.git re PR fortran/40955 (STDCALL attributes are not saved in the .MOD files) 2009-08-13 Jerry DeLisle PR fortran/40955 * gfortran.dg/winapi.f90: New test. From-SVN: r150733 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6719220..bb136c5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-08-13 Jerry DeLisle + + PR fortran/40955 + * gfortran.dg/winapi.f90: New test. + 2009-08-13 Janus Weil PR fortran/40995 diff --git a/gcc/testsuite/gfortran.dg/winapi.f90 b/gcc/testsuite/gfortran.dg/winapi.f90 new file mode 100644 index 0000000..0ee3920 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/winapi.f90 @@ -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