Alexander pointed out the way to do a dg-bogus in an included header.

Tested on x86_64-unknown-linux-gnu, pushed.

        PR tree-optimization/118521
        * g++.dg/torture/pr118521.C: Use dg-bogus properly.
---
 gcc/testsuite/g++.dg/torture/pr118521.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/torture/pr118521.C 
b/gcc/testsuite/g++.dg/torture/pr118521.C
index 1a66aca0e8d..08836bd5f0e 100644
--- a/gcc/testsuite/g++.dg/torture/pr118521.C
+++ b/gcc/testsuite/g++.dg/torture/pr118521.C
@@ -1,7 +1,7 @@
 // { dg-do compile }
 // { dg-additional-options "-Wall" }
 
-#include <vector> // dg-bogus new_allocator.h:191 warning: writing 1 byte into 
a region of size 0
+#include <vector> // { dg-bogus "writing 1 byte into a region of size 0" "" { 
target *-*-* } 0 }
 
 void bar(std::vector<char>);
 
-- 
2.43.0

Reply via email to