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'.
This commit is contained in:
Thomas Schwinge 2020-10-29 10:29:19 +01:00
parent b2a31e2c34
commit 528507fa03

View 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:"
}
#