attribs: Don't diagnose attribute exclusions during error recovery [PR94705]
On the following testcase GCC ICEs, because last_decl is error_mark_node, and diag_attr_exclusions assumes that if it is not NULL, it must be a decl. The following patch just doesn't diagnose attribute exclusions if the other decl is erroneous (and thus we've already reported errors for it). 2020-04-23 Jakub Jelinek <jakub@redhat.com> PR c/94705 * attribs.c (decl_attribute): Don't diagnose attribute exclusions if last_decl is error_mark_node or has such a TREE_TYPE. * gcc.dg/pr94705.c: New test.
Showing
gcc/testsuite/gcc.dg/pr94705.c
0 → 100644
Please
register
or
sign in
to comment