diff options
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r-- | gcc/fortran/trans-decl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 6a4ed9b..34a0d49 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -2488,7 +2488,9 @@ build_function_decl (gfc_symbol * sym, bool global) } -/* Create the DECL_ARGUMENTS for a procedure. */ +/* Create the DECL_ARGUMENTS for a procedure. + NOTE: The arguments added here must match the argument type created by + gfc_get_function_type (). */ static void create_function_arglist (gfc_symbol * sym) @@ -2807,6 +2809,7 @@ create_function_arglist (gfc_symbol * sym) DECL_ARG_TYPE (token) = TREE_VALUE (typelist); TREE_READONLY (token) = 1; hidden_arglist = chainon (hidden_arglist, token); + hidden_typelist = TREE_CHAIN (hidden_typelist); gfc_finish_decl (token); offset = build_decl (input_location, PARM_DECL, @@ -2832,6 +2835,7 @@ create_function_arglist (gfc_symbol * sym) DECL_ARG_TYPE (offset) = TREE_VALUE (typelist); TREE_READONLY (offset) = 1; hidden_arglist = chainon (hidden_arglist, offset); + hidden_typelist = TREE_CHAIN (hidden_typelist); gfc_finish_decl (offset); } |