From: Thomas Schwinge Date: Thu, 29 Oct 2020 09:29:19 +0000 (+0100) Subject: libgomp testsuite: tell warning from error diagnostics, etc. [PR80219, PR85303] X-Git-Tag: releases/gcc-10.3.0~705 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=591e878fc6dd08502429a8e480d8e7d966836ca9;p=thirdparty%2Fgcc.git libgomp testsuite: tell warning from error diagnostics, etc. [PR80219, PR85303] 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'. (cherry picked from commit 528507fa0314c75d1105890e4781a475c8badd7c) --- diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index ee5f0e57b190..a52f83e47ade 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -243,6 +243,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:" } #