https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78716
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think I see the error. If I add this hunk back (that r240072 removed), it
doesn't ICE anymore:
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -4124,6 +4124,8 @@ std_canonical_va_list_type (tree type)
{
tree wtype, htype;
+ if (POINTER_TYPE_P (type) && POINTER_TYPE_P (TREE_TYPE (type)))
+ type = TREE_TYPE (type);
wtype = va_list_type_node;
htype = type;
The testcase won't ICE if I change
__builtin_va_list *s
to
__builtin_va_list s