+2010-02-10 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/43015
+ * trans-decl.c (gfc_generate_function_code): Only check
+ actual-vs.-dummy character bounds if not bind(C).
+
2010-02-10 Jakub Jelinek <jakub@redhat.com>
PR fortran/42309
/* Backend function setup
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Paul Brook
/* If bounds-checking is enabled, generate code to check passed in actual
arguments against the expected dummy argument attributes (e.g. string
lengths). */
- if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
+ if ((gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) && !sym->attr.is_bind_c)
add_argument_checking (&body, sym);
tmp = gfc_trans_code (ns->code);
--- /dev/null
+! { dg-do compile }
+! { dg-options "-fcheck=bounds" }
+!
+! PR fortran/43015
+!
+! Contributed by Dennis Wassel
+!
+SUBROUTINE foo(msg) BIND(C, name = "Foo")
+ USE, INTRINSIC :: iso_c_binding
+ IMPLICIT NONE
+ CHARACTER (KIND=C_CHAR), INTENT (out) :: msg(*)
+END SUBROUTINE foo
+