diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-family/c-attribs.cc | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr98198.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc index c885d88..111a33f 100644 --- a/gcc/c-family/c-attribs.cc +++ b/gcc/c-family/c-attribs.cc @@ -806,6 +806,8 @@ decl_or_type_attrs (tree node) return attrs; tree type = TREE_TYPE (node); + if (type == error_mark_node) + return NULL_TREE; return TYPE_ATTRIBUTES (type); } diff --git a/gcc/testsuite/gcc.dg/pr98198.c b/gcc/testsuite/gcc.dg/pr98198.c new file mode 100644 index 0000000..489afae --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr98198.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +static inline void sub_1 ( ) { + struct struct_1 var_9 , var_10 +} + +static int var_9[1] __attribute__ ( ( section ( ".data" ) ) ) ; +/* { dg-excess-errors "" } */ |