Commit 21516d64 by Volker Reichelt Committed by Volker Reichelt

re PR c/35744 (ICE attributes for invalid types)

	PR c/35744
	* attribs.c (decl_attributes): Return early on errorneous node.

	* gcc.dg/attr-error-1.c: New test.

From-SVN: r134193
parent 0598f31b
2008-04-11 Volker Reichelt <v.reichelt@netcologne.de>
PR c/35744
* attribs.c (decl_attributes): Return early on errorneous node.
2008-04-10 Oleg Ryjkov <olegr@google.com> 2008-04-10 Oleg Ryjkov <olegr@google.com>
* tree.h (struct tree_base): Added a new flag default_def_flag. * tree.h (struct tree_base): Added a new flag default_def_flag.
......
...@@ -225,6 +225,9 @@ decl_attributes (tree *node, tree attributes, int flags) ...@@ -225,6 +225,9 @@ decl_attributes (tree *node, tree attributes, int flags)
tree a; tree a;
tree returned_attrs = NULL_TREE; tree returned_attrs = NULL_TREE;
if (TREE_TYPE (*node) == error_mark_node)
return NULL_TREE;
if (!attributes_initialized) if (!attributes_initialized)
init_attributes (); init_attributes ();
......
2008-04-11 Volker Reichelt <v.reichelt@netcologne.de>
PR c/35744
* gcc.dg/attr-error-1.c: New test.
2008-04-10 Adam Nemet <anemet@caviumnetworks.com> 2008-04-10 Adam Nemet <anemet@caviumnetworks.com>
* gcc.target/mips/scc-2.c: New test. * gcc.target/mips/scc-2.c: New test.
/* PR c/35744 */
typedef char a[N] __attribute__((aligned(4))); /* { dg-error "undeclared" } */
void c[1] __attribute__((vector_size(8))); /* { dg-error "array of voids" } */
void b[1] __attribute__((may_alias)); /* { dg-error "array of voids" } */
struct A
{
void d[1] __attribute__((packed)); /* { dg-error "array of voids" } */
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment