[PATCH] attribs: Fix ICEs on attributes starting with _ [PR103365]
Jakub Jelinek
jakub@redhat.com
Wed Nov 24 09:11:24 GMT 2021
On Wed, Nov 24, 2021 at 12:53:02AM -0800, Andrew Pinski wrote:
> Only one comment on the new testcases, you might want to add a
> testcase for the option on the command line too.
You're right, I've committed the patch with the following
incremental diff in it:
--- gcc/testsuite/c-c++-common/Wno-attributes-4.c 2021-11-23 15:02:23.348804286 +0100
+++ gcc/testsuite/c-c++-common/Wno-attributes-4.c 2021-11-24 10:05:20.769192421 +0100
@@ -1,8 +1,7 @@
/* PR middle-end/103365 */
/* { dg-do compile { target { c || c++11 } } } */
-
-#pragma GCC diagnostic ignored_attributes "foo::_bar"
-#pragma GCC diagnostic ignored_attributes "_foo::bar"
+/* { dg-additional-options "-Wno-attributes=foo::_bar" } */
+/* { dg-additional-options "-Wno-attributes=_foo::bar" } */
[[foo::_bar]] void foo (void);
[[_foo::bar]] void bar (void);
--- gcc/testsuite/c-c++-common/Wno-attributes-5.c.jj 2021-11-24 10:04:37.228813482 +0100
+++ gcc/testsuite/c-c++-common/Wno-attributes-5.c 2021-11-24 10:04:20.254055617 +0100
@@ -0,0 +1,8 @@
+/* PR middle-end/103365 */
+/* { dg-do compile { target { c || c++11 } } } */
+
+#pragma GCC diagnostic ignored_attributes "foo::_bar"
+#pragma GCC diagnostic ignored_attributes "_foo::bar"
+
+[[foo::_bar]] void foo (void);
+[[_foo::bar]] void bar (void);
after testing those tests again with vanilla and patched
compiler.
Jakub
More information about the Gcc-patches
mailing list