I tried to match in dg-warning the whole string, including [-OpenMP], but it 
failed.

I turned out that that was because of -fdiagnostics-urls ...

Solution do what other testsuites do: Use -fdiagnostics-plain-output.

Unless there are further comments, I intent to commit the attached patch later 
today.

Thanks,

Tobias
testsuite/lib/libgomp.exp: compile with -fdiagnostics-plain-output

libgomp.exp added -fno-diagnostics-show-caret and -fdiagnostics-color=never
as 'additional_flags' for compilation. However, it turned out that this now
is insufficient as the [...] part of diagnostics have a hyperlink URL.

Solution: Use the -fdiagnostics-plain-output flag instead, added in commit
r11-2701-g129a1319c0ab73. This flag currently implies the following flags:
   -fno-diagnostics-show-caret
   -fno-diagnostics-show-line-numbers
   -fdiagnostics-color=never
   -fdiagnostics-urls=never
   -fdiagnostics-path-format=separate-events
   -fdiagnostics-text-art-charset=none
   -fno-diagnostics-show-event-links

libgomp/ChangeLog:

	* testsuite/lib/libgomp.exp (libgomp_init): Add
	-fdiagnostics-plain-output to additional_flags; remove
	-fno-diagnostics-show-caret and -fdiagnostics-color=never.

diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index fd21371dce8..bc38e3ca6d9 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -233,11 +233,8 @@ proc libgomp_init { args } {
     # error-message parsing machinery.
     lappend ALWAYS_CFLAGS "additional_flags=-fmessage-length=0"
 
-    # Disable caret
-    lappend ALWAYS_CFLAGS "additional_flags=-fno-diagnostics-show-caret"
-
-    # Disable color diagnostics
-    lappend ALWAYS_CFLAGS "additional_flags=-fdiagnostics-color=never"
+    # Disable caret, color, URL diagnostics
+    lappend ALWAYS_CFLAGS "additional_flags=-fdiagnostics-plain-output"
 
     # Help GCC to find offload compilers' 'mkoffload'.
     global offload_additional_options

Reply via email to