Commit 33215bb3 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/40898 (STDCALL mangling problem for strings @8 instead of @4)

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.

From-SVN: r150216
parent 50fc9135
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> 2009-07-28 Jakub Jelinek <jakub@redhat.com>
PR fortran/40878 PR fortran/40878
......
...@@ -1724,7 +1724,8 @@ create_function_arglist (gfc_symbol * sym) ...@@ -1724,7 +1724,8 @@ create_function_arglist (gfc_symbol * sym)
type = TREE_VALUE (typelist); 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 len_type = TREE_VALUE (hidden_typelist);
tree length = NULL_TREE; tree length = NULL_TREE;
......
...@@ -2249,7 +2249,7 @@ gfc_get_function_type (gfc_symbol * sym) ...@@ -2249,7 +2249,7 @@ gfc_get_function_type (gfc_symbol * sym)
Contained procedures could pass by value as these are never Contained procedures could pass by value as these are never
used without an explicit interface, and cannot be passed as used without an explicit interface, and cannot be passed as
actual parameters for a dummy procedure. */ actual parameters for a dummy procedure. */
if (arg->ts.type == BT_CHARACTER) if (arg->ts.type == BT_CHARACTER && !sym->attr.is_bind_c)
nstr++; nstr++;
typelist = gfc_chainon_list (typelist, type); typelist = gfc_chainon_list (typelist, type);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment