aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2020-11-06 09:18:06 +0100
committerThomas Schwinge <thomas@codesourcery.com>2020-11-24 10:28:04 +0100
commit24b553d0f73ffea2551a77c67859ad6fe44110a6 (patch)
treefde289b8d445e0ad3582fae460e59b6b01a9bd40
parent2aaf44a90283156ec0e70ad4d9030f3ba5054c6f (diff)
downloadgcc-24b553d0f73ffea2551a77c67859ad6fe44110a6.zip
gcc-24b553d0f73ffea2551a77c67859ad6fe44110a6.tar.gz
gcc-24b553d0f73ffea2551a77c67859ad6fe44110a6.tar.bz2
[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.
-rw-r--r--gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c4
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp4
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 3bfe498..6834b9a 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 94c55a9..23a3b39 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 e8ad305..0e1aafec 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