On Tue, Mar 16, 2021 at 11:16:54AM +0100, Richard Biener wrote: > > Not varargs semantics, but unprototyped function semantics, i.e. the same > > as for > > int foo (); > > Which means callers can pass anything, but it is not ..., i.e. callee can't > > use va_start/va_end/va_arg and the ... calling conventions are not in place > > (e.g. the passing of arguments in two places on some targets, or the > > extra %rax on x86_64 etc.). > > Right, so for the caller side looking at DECL_ARGUMENTS is wrong as well > then, the actual argument list is what matters for the used ABI. > > Anyway, I suppose the hook may just give up for calls to unprototyped > functions?
It can't. We can punt at trying to optimize them that way in the vectorizer, that is purely an optimization, but on the function definition, it is an ABI thing and perhaps some caller in some other TU could have correct prototype and call clones that don't exist. Jakub