[PATCH, PR77558] Remove RECORD_TYPE special-casing in std_canonical_va_list_type

Richard Biener richard.guenther@gmail.com
Mon Oct 10 09:54:00 GMT 2016


On Sun, Sep 25, 2016 at 11:08 AM, Tom de Vries <Tom_deVries@mentor.com> wrote:
> Hi,
>
> this patch fixes PR77558, an ice-on-invalid-code 6/7 regression.
>
> The fix for PR71602 introduced the invalid-code test-case
> c-c++-common/va-arg-va-list-type.c:
> ...
> __builtin_va_list *pap;
>
> void
> fn1 (void)
> {
>   __builtin_va_arg (pap, double); /* { dg-error "first argument to 'va_arg'
> not of type 'va_list'" } */
> }
> ...
>
> The test-case passes for x86_64, but fails for aarch64 and ICEs for arm.
>
> The ICE happens because the patch for PR71602 is incomplete. The patch tries
> to be more strict about returning a canonical va_list only for actual
> va_lists, but doesn't implement this for structure va_list types, such as we
> have for arm, aarch64 and alpha.
>
> This patch adds the missing part, and fixes the ICE.
>
> OK for trunk, 6-branch?

Ok.

Richard.

> Thanks,
> - Tom



More information about the Gcc-patches mailing list