This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/71602] [6/7 regression] ICE on __builtin_va_arg in build_va_arg, at c-family/c-common.c:5810


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71602

--- Comment #3 from vries at gcc dot gnu.org ---
Here (
https://gcc.gnu.org/onlinedocs/gccint/Register-Arguments.html#index-TARGET_005fCANONICAL_005fVA_005fLIST_005fTYPE-4283
) I read:
...
Target Hook: tree TARGET_CANONICAL_VA_LIST_TYPE (tree type)

    This hook returns the va_list type of the calling convention specified by
the type of type. If type is not a valid va_list type, it returns NULL_TREE. 
...

I wonder if the root cause of the problem is that ix86_canonical_va_list_type 
doesn't return NULL.

Currently it just strips the pointer from the type:
...
(gdb) call debug_generic_expr ( va_type )
struct [1] *
(gdb) call debug_generic_expr ( canon_va_type )
struct [1]
...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]