On 10 September 2016 at 00:04, Jeff Law <l...@redhat.com> wrote:
> On 08/29/2016 10:12 AM, Tom de Vries wrote:
>>
>> On 29/08/16 17:51, Joseph Myers wrote:
>>>
>>> On Wed, 24 Aug 2016, Tom de Vries wrote:
>>>
>>>> This patch fixes PR71602 by making canonical_va_list_type more strict.
>>>>
>>>> Bootstrapped and reg-tested on x86_64.
>>>>
>>>> OK for trunk, 6-branch?
>>>
>>>
>>> ENOPATCH
>>>
>>
>> Patch attached this time.
>>
>> Thanks,
>> - Tom
>>
>> 0004-Make-canonical_va_list_type-more-strict.patch
>>
>>
>> Make canonical_va_list_type more strict
>>
>> 2016-08-22  Tom de Vries  <t...@codesourcery.com>
>>
>>         PR C/71602
>>         * builtins.c (std_canonical_va_list_type): Strictly return
>> non-null for
>>         va_list type only.
>>         * config/i386/i386.c (ix86_canonical_va_list_type): Same.
>>         * gimplify.c (gimplify_va_arg_expr): Handle &va_list.
>>
>>         * c-common.c (build_va_arg): Handle more strict
>>         targetm.canonical_va_list_type.
>>
>>         * c-c++-common/va-arg-va-list-type.c: New test.
>>
>> ---
>
> Happy to see the _REF nodes disappearing from std_canonical_va_list_type.
> If I understand the code correctly its argument should always be a type
> node, so handling an _REF node makes no sense.
>
> OK for the trunk.
>
> jeff

Hi Tom,

I've noticed that the new testcase (va-arg-va-list-type.c) fails on
arm and aarch64 targets.

On aarch64, the compiler emits no error/warning message, hence the test failure.

On arm, the compiler actually ICEs:
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/c-c++-common/va-arg-va-list-type.c:
In function 'fn1':
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/c-c++-common/va-arg-va-list-type.c:8:26:
internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have pointer_type in
arm_extract_valist_ptr, at config/arm/arm.c:2767
0xde4cda tree_check_failed(tree_node const*, char const*, int, char const*, ...)
        /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree.c:9742
0xe8c28a tree_check3
        /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree.h:3066
0xe8c28a arm_extract_valist_ptr
        /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/config/arm/arm.c:2767
0xe8c2b0 arm_gimplify_va_arg_expr
        /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/config/arm/arm.c:2788
0xd566fa expand_ifn_va_arg_1
        /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-stdarg.c:1043
0xd566fa expand_ifn_va_arg
        /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-stdarg.c:1111
0xd5697b execute
        /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-stdarg.c:1217


Let me know if you need more details.

Thanks,

Christophe

Reply via email to