This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch, testsuite] Fix spurious g++.dg/debug/dwarf2/anonname1.C failure


Hello,

the g++.dg/debug/dwarf2/anonname1.C test case shows a spurious failure
because of what appears to be an incorrectly escaped character in
a scan-assembler-not expression:

 // { dg-final { scan-assembler-not "\._\[0-9\]" } }

The first backslash is not escaped, so the expression arrives in the
regexp machinery as "._[0-9]".  This matches the name "gcc-4_5" of
the directory I'm keeping the sources in -- and that directory name
is part of the -dA annotated assembler output.

Therefore the scan-assembler-not test spuriously fails.

The patch below adds another backslash to properly escape the character.
This fixes the testcase failure for me.

Tested on spu-elf.
OK for mainline?

Bye,
Ulrich


ChangeLog:

	* g++.dg/debug/dwarf2/anonname1.C: Escape backslash in
	scan-assembler-not regular expression.

Index: gcc/testsuite/g++.dg/debug/dwarf2/anonname1.C
===================================================================
*** gcc/testsuite/g++.dg/debug/dwarf2/anonname1.C	(revision 154076)
--- gcc/testsuite/g++.dg/debug/dwarf2/anonname1.C	(working copy)
***************
*** 2,8 ****
  // { dg-do compile }
  // { dg-options "-gdwarf-2 -dA -std=c++0x" }
  // { dg-final { scan-assembler-not "<anonymous" } }
! // { dg-final { scan-assembler-not "\._\[0-9\]" } }
  // { dg-final { scan-assembler-not "\$_\[0-9\]" } }
  // { dg-final { scan-assembler-not "__anon_" } }
  
--- 2,8 ----
  // { dg-do compile }
  // { dg-options "-gdwarf-2 -dA -std=c++0x" }
  // { dg-final { scan-assembler-not "<anonymous" } }
! // { dg-final { scan-assembler-not "\\._\[0-9\]" } }
  // { dg-final { scan-assembler-not "\$_\[0-9\]" } }
  // { dg-final { scan-assembler-not "__anon_" } }
  
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]