From: Thomas Schwinge Date: Fri, 6 Nov 2020 08:51:16 +0000 (+0100) Subject: [testsuite] Emit 'warning' instead of 'error' diagnostics for 'dg-optimized', 'dg... X-Git-Tag: releases/gcc-10.3.0~598 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51bec3f6aa1218aeaa8e5e8cdef28fe712ba2902;p=thirdparty%2Fgcc.git [testsuite] Emit 'warning' instead of 'error' diagnostics for 'dg-optimized', 'dg-missed' The diagnostics produced by 'dg-optimized', 'dg-missed' aren't error diagnostics (fatal, meaning: causes compilation to fail) but rather warning diagnostics (non-fatal, doesn't cause compilation to fail). Thus, same as 'dg-message', these should use 'saved-dg-warning' instead of 'saved-dg-error', which then prints: "(test for *warnings*, line [...]) instead of currently: "(test for *errors*, line [...])". This is a small bug-fix for commit ed2d9d3720adef3a260b8a55e17e744352a901fc "dumpfile.c: use prefixes other than 'note: ' for MSG_{OPTIMIZED_LOCATIONS|MISSED_OPTIMIZATION}", which added 'dg-optimized', 'dg-missed'. gcc/testsuite/ * lib/gcc-dg.exp (dg-optimized, dg-missed): Use 'saved-dg-warning' instead of 'saved-dg-error'. (cherry picked from commit 54f72078fc05b865601645edafbc6b21701ea546) --- diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index cc331214a1ff..58519b0421bd 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -1216,7 +1216,7 @@ proc dg-optimized { args } { # Make this variable available here and to the saved proc. upvar dg-messages dg-messages - process-message saved-dg-error "optimized:" "$args" + process-message saved-dg-warning "optimized:" "$args" } # Handle output from -fopt-info for MSG_MISSED_OPTIMIZATION: @@ -1226,7 +1226,7 @@ proc dg-missed { args } { # Make this variable available here and to the saved proc. upvar dg-messages dg-messages - process-message saved-dg-error "missed:" "$args" + process-message saved-dg-warning "missed:" "$args" } # Check the existence of a gdb in the path, and return true if there