Hi!

On 2020-11-13T15:06:24-0700, Jeff Law <l...@redhat.com> wrote:
> On 11/6/20 1:38 AM, Thomas Schwinge wrote:
>> Subject: [PATCH] [testsuite] Enable column location checking for
>>  'dg-optimized', 'dg-missed'

> OK

Thanks, pushed "[testsuite] Enable column location checking for
'dg-optimized', 'dg-missed'" to master branch in commit
24b553d0f73ffea2551a77c67859ad6fe44110a6, and backported to
releases/gcc-10 branch in commit
f696775c43cc38233b037bf677f72b9b9c0b2cba, and releases/gcc-9 branch in
commit c71d97549d4dca17d452b4a47e406c5f6b2a1a56, 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 24b553d0f73ffea2551a77c67859ad6fe44110a6 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tho...@codesourcery.com>
Date: Fri, 6 Nov 2020 09:18:06 +0100
Subject: [PATCH] [testsuite] Enable column location checking for
 'dg-optimized', 'dg-missed'

'process-message' would like the 'msgprefix' argument without trailing space.

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): Fix 'process-message'
	call.
	* gcc.dg/vect/nodump-vect-opt-info-1.c: Demonstrate.
	* gcc.dg/vect/nodump-vect-opt-info-2.c: Likewise.
---
 gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c | 4 ++--
 gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c | 4 ++--
 gcc/testsuite/lib/gcc-dg.exp                       | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c
index 3bfe498ef0a..6834b9a9d0b 100644
--- a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c
+++ b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c
@@ -5,8 +5,8 @@ void
 vadd (int *dst, int *op1, int *op2, int count)
 {
 /* { dg-prune-output " version\[^\n\r]* alignment" } */
-/* { dg-optimized "loop vectorized" "" { target *-*-* } .+2 } */
-/* { dg-optimized "loop versioned for vectorization because of possible aliasing" "" { target *-*-* } .+1 } */
+/* { dg-optimized "21: loop vectorized" "" { target *-*-* } .+2 } */
+/* { dg-optimized "21: loop versioned for vectorization because of possible aliasing" "" { target *-*-* } .+1 } */
   for (int i = 0; i < count; ++i)
     dst[i] = op1[i] + op2[i];
 }
diff --git a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
index 94c55a92bb4..23a3b39fbb3 100644
--- a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
+++ b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
@@ -6,7 +6,7 @@ extern void accumulate (int x, int *a);
 int test_missing_function_defn (int *arr, int n) /* { dg-message "vectorized 0 loops in function" } */
 {
   int sum = 0;
-  for (int i = 0; i < n; ++i) /* { dg-missed "couldn't vectorize loop" } */
-    accumulate (arr[i], &sum); /* { dg-missed "statement clobbers memory: accumulate \\(.*\\);" } */
+  for (int i = 0; i < n; ++i) /* { dg-missed "21: couldn't vectorize loop" } */
+    accumulate (arr[i], &sum); /* { dg-missed "5: statement clobbers memory: accumulate \\(.*\\);" } */
   return sum;
 }
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index e8ad3052657..0e1aafec82f 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-error "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-error "missed:" "$args"
 }
 
 # Check the existence of a gdb in the path, and return true if there
-- 
2.17.1

>From f696775c43cc38233b037bf677f72b9b9c0b2cba Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tho...@codesourcery.com>
Date: Fri, 6 Nov 2020 09:18:06 +0100
Subject: [PATCH] [testsuite] Enable column location checking for
 'dg-optimized', 'dg-missed'

'process-message' would like the 'msgprefix' argument without trailing space.

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): Fix 'process-message'
	call.
	* gcc.dg/vect/nodump-vect-opt-info-1.c: Demonstrate.
	* gcc.dg/vect/nodump-vect-opt-info-2.c: Likewise.

(cherry picked from commit 24b553d0f73ffea2551a77c67859ad6fe44110a6)
---
 gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c | 4 ++--
 gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c | 4 ++--
 gcc/testsuite/lib/gcc-dg.exp                       | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c
index 3bfe498ef0a..1bc35d9ec5f 100644
--- a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c
+++ b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c
@@ -5,8 +5,8 @@ void
 vadd (int *dst, int *op1, int *op2, int count)
 {
 /* { dg-prune-output " version\[^\n\r]* alignment" } */
-/* { dg-optimized "loop vectorized" "" { target *-*-* } .+2 } */
-/* { dg-optimized "loop versioned for vectorization because of possible aliasing" "" { target *-*-* } .+1 } */
+/* { dg-optimized "3: loop vectorized" "" { target *-*-* } .+2 } */
+/* { dg-optimized "3: loop versioned for vectorization because of possible aliasing" "" { target *-*-* } .+1 } */
   for (int i = 0; i < count; ++i)
     dst[i] = op1[i] + op2[i];
 }
diff --git a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
index 94c55a92bb4..c426d19eb41 100644
--- a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
+++ b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
@@ -6,7 +6,7 @@ extern void accumulate (int x, int *a);
 int test_missing_function_defn (int *arr, int n) /* { dg-message "vectorized 0 loops in function" } */
 {
   int sum = 0;
-  for (int i = 0; i < n; ++i) /* { dg-missed "couldn't vectorize loop" } */
-    accumulate (arr[i], &sum); /* { dg-missed "statement clobbers memory: accumulate \\(.*\\);" } */
+  for (int i = 0; i < n; ++i) /* { dg-missed "3: couldn't vectorize loop" } */
+    accumulate (arr[i], &sum); /* { dg-missed "5: statement clobbers memory: accumulate \\(.*\\);" } */
   return sum;
 }
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 45d97024883..cc331214a1f 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-error "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-error "missed:" "$args"
 }
 
 # Check the existence of a gdb in the path, and return true if there
-- 
2.17.1

>From c71d97549d4dca17d452b4a47e406c5f6b2a1a56 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tho...@codesourcery.com>
Date: Fri, 6 Nov 2020 09:18:06 +0100
Subject: [PATCH] [testsuite] Enable column location checking for
 'dg-optimized', 'dg-missed'

'process-message' would like the 'msgprefix' argument without trailing space.

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): Fix 'process-message'
	call.
	* gcc.dg/vect/nodump-vect-opt-info-1.c: Demonstrate.
	* gcc.dg/vect/nodump-vect-opt-info-2.c: Likewise.

(cherry picked from commit 24b553d0f73ffea2551a77c67859ad6fe44110a6)
---
 gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c | 4 ++--
 gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c | 4 ++--
 gcc/testsuite/lib/gcc-dg.exp                       | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c
index 3bfe498ef0a..1bc35d9ec5f 100644
--- a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c
+++ b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c
@@ -5,8 +5,8 @@ void
 vadd (int *dst, int *op1, int *op2, int count)
 {
 /* { dg-prune-output " version\[^\n\r]* alignment" } */
-/* { dg-optimized "loop vectorized" "" { target *-*-* } .+2 } */
-/* { dg-optimized "loop versioned for vectorization because of possible aliasing" "" { target *-*-* } .+1 } */
+/* { dg-optimized "3: loop vectorized" "" { target *-*-* } .+2 } */
+/* { dg-optimized "3: loop versioned for vectorization because of possible aliasing" "" { target *-*-* } .+1 } */
   for (int i = 0; i < count; ++i)
     dst[i] = op1[i] + op2[i];
 }
diff --git a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
index 94c55a92bb4..c426d19eb41 100644
--- a/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
+++ b/gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
@@ -6,7 +6,7 @@ extern void accumulate (int x, int *a);
 int test_missing_function_defn (int *arr, int n) /* { dg-message "vectorized 0 loops in function" } */
 {
   int sum = 0;
-  for (int i = 0; i < n; ++i) /* { dg-missed "couldn't vectorize loop" } */
-    accumulate (arr[i], &sum); /* { dg-missed "statement clobbers memory: accumulate \\(.*\\);" } */
+  for (int i = 0; i < n; ++i) /* { dg-missed "3: couldn't vectorize loop" } */
+    accumulate (arr[i], &sum); /* { dg-missed "5: statement clobbers memory: accumulate \\(.*\\);" } */
   return sum;
 }
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 547b6465d74..c2600f2b746 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-error "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-error "missed:" "$args"
 }
 
 # Check the existence of a gdb in the path, and return true if there
-- 
2.17.1

Reply via email to