PR fortran/40898
* trans-types.c (gfc_get_function_type): Do not add hidden
string-length argument for BIND(C) procedures.
* trans-decl.c (create_function_arglist): Skip over nonexisting
string-length arguments for BIND(C) procedures.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150216
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-07-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/40898
+ * trans-types.c (gfc_get_function_type): Do not add hidden
+ string-length argument for BIND(C) procedures.
+ * trans-decl.c (create_function_arglist): Skip over nonexisting
+ string-length arguments for BIND(C) procedures.
+
2009-07-28 Jakub Jelinek <jakub@redhat.com>
PR fortran/40878
type = TREE_VALUE (typelist);
- if (f->sym->ts.type == BT_CHARACTER)
+ if (f->sym->ts.type == BT_CHARACTER
+ && (!sym->attr.is_bind_c || sym->attr.entry_master))
{
tree len_type = TREE_VALUE (hidden_typelist);
tree length = NULL_TREE;
Contained procedures could pass by value as these are never
used without an explicit interface, and cannot be passed as
actual parameters for a dummy procedure. */
- if (arg->ts.type == BT_CHARACTER)
+ if (arg->ts.type == BT_CHARACTER && !sym->attr.is_bind_c)
nstr++;
typelist = gfc_chainon_list (typelist, type);
}