After r17-4537-g059231fb8a42ea, two error messages instead of
just one is emitted. So let's look for both of them.

Pushed as obvious after testing to make sure the testcase passes
now for both C and C++.

gcc/testsuite/ChangeLog:

        * c-c++-common/gomp/has-include-1.c: Add second dg-error.

Signed-off-by: Andrea Pinski <[email protected]>
---
 gcc/testsuite/c-c++-common/gomp/has-include-1.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/c-c++-common/gomp/has-include-1.c 
b/gcc/testsuite/c-c++-common/gomp/has-include-1.c
index bb1b9052685..9532208b84b 100644
--- a/gcc/testsuite/c-c++-common/gomp/has-include-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/has-include-1.c
@@ -4,5 +4,6 @@ void
 foo (void)
 {
 #pragma omp parallel if (__has_include ("<stdlib.h>")) /* { dg-error "used 
outside of preprocessing directive" } */
+/* { dg-error "a function" "" { target *-*-* } .-1 } */
   ;
 }
-- 
2.43.0

Reply via email to