This is the mail archive of the gcc-patches@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]

Re: C PATCH for c/71574 (ICE with alloc_align attribute)


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  <polacek@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


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