libgomp testsuite: tell warning from error diagnostics, etc. [PR80219, PR85303]
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 29 Oct 2020 09:29:19 +0000 (10:29 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Mon, 2 Nov 2020 13:14:43 +0000 (14:14 +0100)
This changes makes 'dg-warning', 'dg-error', 'dg-bogus', 'dg-message' behave as
expected, and also enables use of relative line numbers as well as 'dg-line'.

libgomp/
PR testsuite/80219
PR testsuite/85303
* testsuite/lib/libgomp.exp (libgomp_init): Set
'gcc_warning_prefix', 'gcc_error_prefix'.

libgomp/testsuite/lib/libgomp.exp

index 5d86e2ac095fc8fa426ff28ecb8ee851e5e5b598..72d001186a5767eca406aee151378c5a559d05a4 100644 (file)
@@ -241,6 +241,12 @@ proc libgomp_init { args } {
     if { $offload_additional_options != "" } {
        lappend ALWAYS_CFLAGS "additional_flags=${offload_additional_options}"
     }
+
+    # Tell warning from error diagnostics.  This fits for C, C++, and Fortran.
+    global gcc_warning_prefix
+    set gcc_warning_prefix "\[Ww\]arning:"
+    global gcc_error_prefix
+    set gcc_error_prefix "(\[Ff\]atal )?\[Ee\]rror:"
 }
 
 #