From 1ccba7b77c3b11868bb0cf627bd3fb465acded6f Mon Sep 17 00:00:00 2001 From: reichelt Date: Fri, 11 Apr 2008 06:55:38 +0000 Subject: PR c/35744 * attribs.c (decl_attributes): Return early on errorneous node. * gcc.dg/attr-error-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134193 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/attribs.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/attribs.c') diff --git a/gcc/attribs.c b/gcc/attribs.c index 767035b5dd1..65233de9e55 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -225,6 +225,9 @@ decl_attributes (tree *node, tree attributes, int flags) tree a; tree returned_attrs = NULL_TREE; + if (TREE_TYPE (*node) == error_mark_node) + return NULL_TREE; + if (!attributes_initialized) init_attributes (); -- cgit v1.2.1