diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 540d356366ed..5924892e777b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2009-08-04 Tobias Burnus + + PR fortran/40949 + * trans-types.c (gfc_get_function_type): Fix typelist of + functions without argument. + 2009-08-04 Paul Thomas PR fortran/40875 diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 92373e1b1a2d..5ae9a00517ff 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -2324,8 +2324,7 @@ gfc_get_function_type (gfc_symbol * sym) while (nstr--) typelist = gfc_chainon_list (typelist, gfc_charlen_type_node); - if (typelist) - typelist = gfc_chainon_list (typelist, void_type_node); + typelist = gfc_chainon_list (typelist, void_type_node); if (alternate_return) type = integer_type_node;