https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77558
Christophe Lyon <clyon at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clyon at gcc dot gnu.org --- Comment #3 from Christophe Lyon <clyon at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #1) > This patch seems to fix the problem: > ... > diff --git a/gcc/builtins.c b/gcc/builtins.c > index e779c71..93a5f3b 100644 > --- a/gcc/builtins.c > +++ b/gcc/builtins.c > @@ -4089,10 +4089,7 @@ std_canonical_va_list_type (tree type) > > wtype = va_list_type_node; > htype = type; > - /* Treat structure va_list types. */ > - if (TREE_CODE (wtype) == RECORD_TYPE && POINTER_TYPE_P (htype)) > - htype = TREE_TYPE (htype); > - else if (TREE_CODE (wtype) == ARRAY_TYPE) > + if (TREE_CODE (wtype) == ARRAY_TYPE) > { > /* If va_list is an array type, the argument may have decayed > to a pointer type, e.g. by being passed to another function. > ... > > Should get some testing on aarch64. This patch does make the test pass on aarch64, thanks.