public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite] Fix g++.dg/debug/dwarf2/pr54508.C on Solaris 9/x86
@ 2013-01-08 12:11 Rainer Orth
  2013-01-08 12:15 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2013-01-08 12:11 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]

g++.dg/debug/dwarf2/pr54508.C is FAILing on Solaris 9/x86 (both with as
and gas):

FAIL: g++.dg/debug/dwarf2/pr54508.C -std=gnu++98  scan-assembler "c\\\\\\\\0"[ \\t]+[#;/!|@]+ DW_AT_name[\\r\\n]+[^\\r\\n]+[\\r\\n]+[^\\r\\n]+[\\r\\n]+[^#;/!|@]+[#;/!|@]+ DW_AT_decl_line[\\r\\n]+[^#;/!|@]+[#;/!|@]+ DW_AT_declaration
FAIL: g++.dg/debug/dwarf2/pr54508.C -std=gnu++98  scan-assembler "s\\\\\\\\0"[ \\t]+[#;/!|@]+ DW_AT_name
FAIL: g++.dg/debug/dwarf2/pr54508.C -std=gnu++98  scan-assembler "f1\\\\\\\\0"[ \\t]+[#;/!|@]+ DW_AT_name
FAIL: g++.dg/debug/dwarf2/pr54508.C -std=gnu++98  scan-assembler "u\\\\\\\\0"[ \\t]+[#;/!|@]+ DW_AT_name[\\r\\n]+[^\\r\\n]+[\\r\\n]+[^\\r\\n]+[\\r\\n]+[^#;/!|@]+[#;/!|@]+ DW_AT_decl_line[\\r\\n]+[^#;/!|@]+[#;/!|@]+ DW_AT_declaration

This turns out to be due to whitespace differences in assembler
comments between Solaris 9 and 10:

-       .byte   0x3     /  uleb128 0x3; (DW_AT_name)
+       .byte   0x3     / uleb128 0x3; (DW_AT_name)

I've traced this to different values of ASM_COMMENT_START:

  config/i386/unix.h:#define ASM_COMMENT_START "/ "
  config/i386/sol2-bi.h:#define ASM_COMMENT_START "/"

The following patch fixes this; tested with the appropriate runtest
invocations on i386-pc-solaris2.9, i386-pc-solaris2.10, and
x86_64-unknown-linux-gnu.

Ok for mainline?

	Rainer


2013-01-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* g++.dg/debug/dwarf2/pr54508.C: Allow for more whitespace after
	asm comments.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol9-testsuite-pr54508.patch --]
[-- Type: text/x-patch, Size: 3096 bytes --]

# HG changeset patch
# Parent 6f6b53ac13329dd89e81296140f3c39de724e7a7
Fix g++.dg/debug/dwarf2/pr54508.C on Solaris 9/x86

diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C
@@ -2,17 +2,17 @@
 // { dg-do compile }
 // { dg-options "-g2 -dA -fno-merge-debug-strings" }
 
-// { dg-final { scan-assembler-not "\"cbase\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } }
-// { dg-final { scan-assembler "\"c\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ DW_AT_decl_line\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ DW_AT_declaration" } }
-// { dg-final { scan-assembler-not "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } }
-// { dg-final { scan-assembler-not "\"bi\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } }
-// { dg-final { scan-assembler-not "\"si\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } }
-// { dg-final { scan-assembler "\"s\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } }
-// { dg-final { scan-assembler-not "\"s\\\\0\"\[^#;/!|@\]+\[#;/!|@\]+ DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ DW_AT_decl_line\[\r\n\]+\[ \t\]+\[#;/!|@\]+ DW_AT_declaration" } }
-// { dg-final { scan-assembler "\"f1\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } }
-// { dg-final { scan-assembler "\"u\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ DW_AT_decl_line\[\r\n\]+\[^#;/!|@\]+\[#;/!|@\]+ DW_AT_declaration" } }
-// { dg-final { scan-assembler-not "\"f2\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } }
-// { dg-final { scan-assembler-not "\"nc\\\\0\"\[ \t\]+\# DW_AT_name" } }
+// { dg-final { scan-assembler-not "\"cbase\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler "\"c\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ +DW_AT_decl_line\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ +DW_AT_declaration" } }
+// { dg-final { scan-assembler-not "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler-not "\"bi\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler-not "\"si\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler "\"s\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler-not "\"s\\\\0\"\[^#;/!|@\]+\[#;/!|@\]+ +DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ +DW_AT_decl_line\[\r\n\]+\[ \t\]+\[#;/!|@\]+ +DW_AT_declaration" } }
+// { dg-final { scan-assembler "\"f1\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler "\"u\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ +DW_AT_decl_line\[\r\n\]+\[^#;/!|@\]+\[#;/!|@\]+ +DW_AT_declaration" } }
+// { dg-final { scan-assembler-not "\"f2\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler-not "\"nc\\\\0\"\[ \t\]+\# +DW_AT_name" } }
 
 class cbase
 

[-- Attachment #3: Type: text/plain, Size: 144 bytes --]



-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [testsuite] Fix g++.dg/debug/dwarf2/pr54508.C on Solaris 9/x86
  2013-01-08 12:11 [testsuite] Fix g++.dg/debug/dwarf2/pr54508.C on Solaris 9/x86 Rainer Orth
@ 2013-01-08 12:15 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2013-01-08 12:15 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches

On Tue, Jan 08, 2013 at 01:11:24PM +0100, Rainer Orth wrote:
> Ok for mainline?

Yes, thanks.

> 2013-01-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* g++.dg/debug/dwarf2/pr54508.C: Allow for more whitespace after
> 	asm comments.

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-08 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-08 12:11 [testsuite] Fix g++.dg/debug/dwarf2/pr54508.C on Solaris 9/x86 Rainer Orth
2013-01-08 12:15 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).