From: Thomas Schwinge Date: Fri, 6 Nov 2020 08:18:06 +0000 (+0100) Subject: [testsuite] Enable column location checking for 'dg-optimized', 'dg-missed' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24b553d0f73ffea2551a77c67859ad6fe44110a6;p=gcc.git [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. --- 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