https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128163
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-10-25
Keywords|documentation |wrong-code
--- Comment #8 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
The problem is this check in handle_unsequenced_attribute:
```
for (tree argtype = TYPE_ARG_TYPES (fntype); argtype;
argtype = TREE_CHAIN (argtype))
/* If any of the arguments have pointer or reference type, just
add the attribute alone. */
if (POINTER_TYPE_P (TREE_VALUE (argtype)))
return NULL_TREE;
```
Is wrong for var-args functions. Also wrong for the non-prototype functions.