Doing so allows for multiline directives to contain things like
"note: " which would otherwise already have been pruned.

gcc/testsuite/ChangeLog:
        * lib/prune.exp (prune_gcc_output): Move multiline-handling to
        before other pruning.

Signed-off-by: David Malcolm <dmalc...@redhat.com>
---
 gcc/testsuite/lib/prune.exp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index 04c6a1dd7a1..fd6584d0e7d 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -40,6 +40,13 @@ proc prune_gcc_output { text } {
     # Remove Windows .exe suffix
     regsub -all "(as|cc1|cc1plus|collect2|f951|ld|lto-wrapper)\.exe?:" $text 
{\1:} text
 
+    # If dg-enable-nn-line-numbers was provided, then obscure source-margin
+    # line numbers by converting them to "NN" form.
+    set text [maybe-handle-nn-line-numbers $text]
+    
+    # Call into multiline.exp to handle any multiline output directives.
+    set text [handle-multiline-outputs $text]
+
     regsub -all "(^|\n)(\[^\n\]*: \[iI\]|I)n ((static member |lambda 
)?function|member|method|(copy 
)?constructor|destructor|instantiation|substitution|program|subroutine|block-data)\[^\n\]*"
 $text "" text
     regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*" 
$text "" text
     regsub -all "(^|\n)\[^\n\]*:   (recursively )?required \[^\n\]*" $text "" 
text
@@ -108,13 +115,6 @@ proc prune_gcc_output { text } {
     # Many tests that use visibility will still pass on platforms that don't 
support it.
     regsub -all "(^|\n)\[^\n\]*lto1: warning: visibility attribute not 
supported in this configuration; ignored\[^\n\]*" $text "" text
 
-    # If dg-enable-nn-line-numbers was provided, then obscure source-margin
-    # line numbers by converting them to "NN" form.
-    set text [maybe-handle-nn-line-numbers $text]
-    
-    # Call into multiline.exp to handle any multiline output directives.
-    set text [handle-multiline-outputs $text]
-
     #send_user "After:$text\n"
 
     return $text
-- 
2.26.3

Reply via email to