diff mbox series

gcc testsuite changes for new linker messages

Message ID 20180227221501.GW3812@bubble.grove.modra.org
State New
Headers show
Series gcc testsuite changes for new linker messages | expand

Commit Message

Alan Modra Feb. 27, 2018, 10:15 p.m. UTC
GNU ld error messages have changed to comply with the GNU coding
standards.  The two fixes in this patch look to be the only required
changes in the GCC testsuite.  I've written the prune_gcc_output patch
the way I have to try to capture the fact that the lower case "in
function" is correct for a message preceded by "ld: object(sec+off): "
but "In function" is correct when the phrase starts a sentence.

Bootstrapped and regression tested x86_64-linux.  OK to apply all
branches?

	* lib/prune.exp (prune_gcc_output): Match lower case "in function"
	GNU ld message.
	* g++.dg/other/anon5.C: Match lower case "bad value" GNU ld message.

Comments

Jeff Law Feb. 28, 2018, 6:10 a.m. UTC | #1
On 02/27/2018 03:15 PM, Alan Modra wrote:
> GNU ld error messages have changed to comply with the GNU coding
> standards.  The two fixes in this patch look to be the only required
> changes in the GCC testsuite.  I've written the prune_gcc_output patch
> the way I have to try to capture the fact that the lower case "in
> function" is correct for a message preceded by "ld: object(sec+off): "
> but "In function" is correct when the phrase starts a sentence.
> 
> Bootstrapped and regression tested x86_64-linux.  OK to apply all
> branches?
> 
> 	* lib/prune.exp (prune_gcc_output): Match lower case "in function"
> 	GNU ld message.
> 	* g++.dg/other/anon5.C: Match lower case "bad value" GNU ld message.
OK.
jeff
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/other/anon5.C b/gcc/testsuite/g++.dg/other/anon5.C
index 2a6f57f..ee4601e 100644
--- a/gcc/testsuite/g++.dg/other/anon5.C
+++ b/gcc/testsuite/g++.dg/other/anon5.C
@@ -4,7 +4,7 @@ 
 // Ignore additional message on powerpc-ibm-aix
 // { dg-prune-output "obtain more information" } */
 // Ignore additional messages on Linux/x86 with PIE
-// { dg-prune-output "Bad value" } */
+// { dg-prune-output "\[Bb\]ad value" } */
 
 namespace {
   struct c
diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index 2f26c6f..1e11dc9 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -31,7 +31,7 @@  proc prune_gcc_output { text } {
     # Handle any freeform regexps.
     set text [handle-dg-regexps $text]
 
-    regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|substitution|program|subroutine|block-data)\[^\n\]*" $text "" 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
     regsub -all "(^|\n)\[^\n\]*:   . skipping \[0-9\]* instantiation contexts \[^\n\]*" $text "" text