On 07/28/2016 03:26 PM, Marek Polacek wrote:
Many attributes that accept integer constant as a parameter call
default_conversion for such constants to perform the usual arithmetic
conversions.  The call to default_conversion is always guarded so as
to prevent a NULL_TREE, an IDENTIFIER_NODE, or a FUNCTION_DECL from
getting into this function.  But the alloc_align attribute was missing
the FUNCTION_DECL check, so we were crashing when someone passed a
function decl as a parameter to it.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

2016-07-28  Marek Polacek  <pola...@redhat.com>

        PR c/71574
        * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.

        * c-c++-common/pr71574.c: New test.

Ok.


Bernd

Reply via email to