diff mbox

[testsuite] Allow for / comments in g++.dg/debug/dwarf2/nested-3.C

Message ID yddbom01aus.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth May 7, 2012, 11:36 a.m. UTC
g++.dg/debug/dwarf2/nested-3.C currently FAILs on Solaris/x86 and
Darwin/x86 (scan-assembler), for two reasons:

* First of all, Solaris uses / instead of # as comment character.  There
  seem to be many others, but I cannot tell which of them are relevant
  for this testcase.

* Even with this fixed, the test still fails with Sun as which doesn't
  support .uleb128.  Instead of the expected

      .uleb128 0x5	# (DIE (0x39) DW_TAG_subprogram)

  the .s files has

      .byte   0x5     / uleb128 0x5; (DIE (0x138) DW_TAG_subprogram)

This patch fixes both issues.

Tested with the appropriate runtest invocation on i386-pc-solaris2.11
(as and gas), x86_64-apple-darwin11.3.0, and x86_64-unknown-linux-gnu.
Ok for mainline?

	Rainer


2012-05-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* g++.dg/debug/dwarf2/nested-3.C: Allow for / comments and missing
	.uleb128 support in assembler output.

Comments

Jason Merrill May 7, 2012, 12:48 p.m. UTC | #1
OK, thanks.

Jason
diff mbox

Patch

# HG changeset patch
# Parent 1b4b86e2af2f270c64ff1f5549825c8a5a853139
Allow for / comments in g++.dg/debug/dwarf2/nested-3.C

diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C
--- a/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C
@@ -59,4 +59,4 @@  main ()
 //
 //     Hence the scary regexp:
 //
-//     { dg-final { scan-assembler "\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_namespace\\)\[\n\r\]+\[^\n\r\]*\"thread\[\^\n\r]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_class_type\\)(\[\n\r\]+\[^\n\r\]*)+\"Executor\[^\n\r\]+\[\n\r\]+\[^\n\r\]*DW_AT_declaration\[\n\r\]+\[^\n\r\]*DW_AT_signature\[^#\]*# \\(DIE\[^\n\r\]*DW_TAG_subprogram\\)\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\"CurrentExecutor\[^\n\r\]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*end of children of DIE 0x\\3\[\n\r]+\[^\n\r\]*end of children of DIE 0x\\1\[\n\r]+" } }
+//     { dg-final { scan-assembler "\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_namespace\\)\[\n\r\]+\[^\n\r\]*\"thread\[\^\n\r]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_class_type\\)(\[\n\r\]+\[^\n\r\]*)+\"Executor\[^\n\r\]+\[\n\r\]+\[^\n\r\]*DW_AT_declaration\[\n\r\]+\[^\n\r\]*DW_AT_signature\[^#/\]*\[#/\] \[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_subprogram\\)\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\"CurrentExecutor\[^\n\r\]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*end of children of DIE 0x\\3\[\n\r]+\[^\n\r\]*end of children of DIE 0x\\1\[\n\r]+" } }