'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.
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];
}
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;
}
# 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:
# 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