https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84229
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid CC| |mpolacek at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Component|ipa |c --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Huh, __builtin_va_arg_pack_len is only valid within varargs functions. The difference seems to be that without LTO we simply emit a library call and not emit aa.i:open (which is invalid) but with LTO we inline the call and thus end up trying to expand the builtin. So it's rather a accepts-invalid without LTO ;) Or LTO misbehaving in not throwing away extern inline functions that are not used within TU boundaries... Honza - any opinion on that? Marek, can we somehow error from the FE if __builtin_va_arg_pack[_len] is used in a non-varargs function?