On 8/16/25 11:13 PM, Nathaniel Shead wrote:
Tested on x86_64-pc-linux-gnu and verified with a powerpc64-linux-gnu
cross.  OK for trunk and 15?

OK (obvious)

-- >8 --

I added a testcase for the (temporary) warning that we don't currently
support the 'gnu::optimize' or 'gnu::target' attributes in r15-10183;
however, some targets produce target nodes even when only an optimize
attribute is present.  This adjusts the warning.

        PR c++/108080
        PR c++/121396

gcc/testsuite/ChangeLog:

        * g++.dg/modules/pr108080.H: Also allow target warnings.

Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>
---
  gcc/testsuite/g++.dg/modules/pr108080.H | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/modules/pr108080.H 
b/gcc/testsuite/g++.dg/modules/pr108080.H
index b05d9573b07..e26afcbba2a 100644
--- a/gcc/testsuite/g++.dg/modules/pr108080.H
+++ b/gcc/testsuite/g++.dg/modules/pr108080.H
@@ -2,4 +2,4 @@
  // { dg-additional-options "-fmodules" }
  // Give a diagnostic message rather than a crash for unsupported features.
-[[gnu::optimize("-O3")]] void foo(); // { dg-warning "optimize" }
+[[gnu::optimize("-O3")]] void foo();  // { dg-warning "optimize|target" }

Reply via email to