Hi!

On 2020-11-13T15:06:45-0700, Jeff Law <l...@redhat.com> wrote:
> On 11/6/20 1:50 AM, Thomas Schwinge wrote:
>> On 2018-09-25T16:00:14-0400, David Malcolm <dmalc...@redhat.com> wrote:
>>> The patch adds "dg-optimized" and "dg-missed" directives

>> These currently print "(test for *errors*, line [...])".  However, these
>> diagnostics are not actually 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 will print: "(test
>> for *warnings*, line [...])".  OK to change that after regression
>> testing?
>
> Yes.

Thanks, pushed "[testsuite] Emit 'warning' instead of 'error' diagnostics
for 'dg-optimized', 'dg-missed'" to master branch in commit
54f72078fc05b865601645edafbc6b21701ea546, and backported to
releases/gcc-10 branch in commit
51bec3f6aa1218aeaa8e5e8cdef28fe712ba2902, and releases/gcc-9 branch in
commit b5eabef5daa1393763f2f6df6562d0c4c8ef63ab, see attached.
(Functionality not present in releases/gcc-8 branch.)


Grüße
 Thomas


-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander 
Walter
>From 54f72078fc05b865601645edafbc6b21701ea546 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tho...@codesourcery.com>
Date: Fri, 6 Nov 2020 09:51:16 +0100
Subject: [PATCH] [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'.
---
 gcc/testsuite/lib/gcc-dg.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 0e1aafec82f..700529afbe2 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -1232,7 +1232,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:
@@ -1242,7 +1242,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
-- 
2.17.1

>From 51bec3f6aa1218aeaa8e5e8cdef28fe712ba2902 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tho...@codesourcery.com>
Date: Fri, 6 Nov 2020 09:51:16 +0100
Subject: [PATCH] [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)
---
 gcc/testsuite/lib/gcc-dg.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index cc331214a1f..58519b0421b 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
-- 
2.17.1

>From b5eabef5daa1393763f2f6df6562d0c4c8ef63ab Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tho...@codesourcery.com>
Date: Fri, 6 Nov 2020 09:51:16 +0100
Subject: [PATCH] [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)
---
 gcc/testsuite/lib/gcc-dg.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index c2600f2b746..b756f7c80f9 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -1225,7 +1225,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:
@@ -1235,7 +1235,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
-- 
2.17.1

Reply via email to