This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44471] Wrong call with variadic declaration
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Aug 2010 09:51:15 -0000
- Subject: [Bug fortran/44471] Wrong call with variadic declaration
- References: <bug-44471-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from jakub at gcc dot gnu dot org 2010-08-17 09:51 -------
The #c2 patch is problematic, because build_function_type shares function
types, so setting TYPE_ARG_TYPES on that I'm afraid will affect all functions
with
(...) arguments and the same return type. So, the arglist needs to be passed
down to gfc_get_function_type or wherever build_function_type is called.
Furthermore, this doesn't help the case of functions that have no arguments
(when we build_function_decl instead gfc_get_extern_function_decl, yet
sym->formal is NULL or gfc_get_extern_function_decl for call noargsfn () ).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44471