------- Comment #11 from hjl dot tools at gmail dot com 2009-08-05 19:52 ------- This patch works:
--- ./trans-types.c.foo 2009-08-05 07:26:53.000000000 -0700 +++ ./trans-types.c 2009-08-05 12:51:00.000000000 -0700 @@ -2324,7 +2324,10 @@ gfc_get_function_type (gfc_symbol * sym) while (nstr--) typelist = gfc_chainon_list (typelist, gfc_charlen_type_node); - typelist = gfc_chainon_list (typelist, void_type_node); + /* If the explicit interface is known, we tell the middle end + that no more additional arguments will follow in calls. */ + if (typelist || sym->attr.if_source != IFSRC_UNKNOWN) + typelist = gfc_chainon_list (typelist, void_type_node); if (alternate_return) type = integer_type_node; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40969