* trans-types.c (gfc_get_function_type): Do not add void_type_node
to empty arg list.
* trans-decl.c (create_function_arglist): Change assert.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121347
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-01-30 Steve Ellcey <sje@cup.hp.com>
+
+ PR fortran/30432
+ * trans-types.c (gfc_get_function_type): Do not add void_type_node
+ to empty arg list.
+ * trans-decl.c (create_function_arglist): Change assert.
+
2007-01-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30554
/* Add the hidden string length parameters. */
arglist = chainon (arglist, hidden_arglist);
- gcc_assert (TREE_VALUE (hidden_typelist) == void_type_node);
+ gcc_assert (hidden_typelist == NULL_TREE
+ || TREE_VALUE (hidden_typelist) == void_type_node);
DECL_ARGUMENTS (fndecl) = arglist;
}
while (nstr--)
typelist = gfc_chainon_list (typelist, gfc_charlen_type_node);
- typelist = gfc_chainon_list (typelist, void_type_node);
+ if (typelist)
+ typelist = gfc_chainon_list (typelist, void_type_node);
if (alternate_return)
type = integer_type_node;