C++ PATCH for c++/53756 (-g and C++1y auto)
Andreas Schwab
schwab@linux-m68k.org
Wed Jan 29 10:37:00 GMT 2014
Jason Merrill <jason@redhat.com> writes:
> +// { dg-final { scan-assembler "a1.*(0x\[0-9a-f\]+)\[ \t\]*# DW_AT_type.*\\1. DW_TAG_unspecified_type.*DW_AT_specification\[\n\r\]{1,2}\[^\n\r\]*(0x\[0-9a-f\]+)\[ \t\]*# DW_AT_type.*\\2. DW_TAG_base_type" } }
This regexp is completely broken.
Here's what I get on m68k:
.uleb128 0x3 | (DIE (0x2b) DW_TAG_subprogram)
| DW_AT_external
.ascii "a1\0" | DW_AT_name
.byte 0x1 | DW_AT_decl_file (/daten/aranym/gcc/gcc-20140129/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C)
.byte 0x17 | DW_AT_decl_line
.long .LASF2 | DW_AT_linkage_name: "_ZN1A2a1Ev"
.long 0x44 | DW_AT_type
| DW_AT_declaration
.long 0x3d | DW_AT_object_pointer
.uleb128 0x4 | (DIE (0x3d) DW_TAG_formal_parameter)
.long 0x49 | DW_AT_type
| DW_AT_artificial
.byte 0 | end of children of DIE 0x2b
.byte 0 | end of children of DIE 0x21
.uleb128 0x5 | (DIE (0x44) DW_TAG_unspecified_type)
.long .LASF3 | DW_AT_name: "auto"
.uleb128 0x6 | (DIE (0x49) DW_TAG_pointer_type)
.byte 0x4 | DW_AT_byte_size
.long 0x21 | DW_AT_type
.uleb128 0x7 | (DIE (0x4f) DW_TAG_subprogram)
.long 0x2b | DW_AT_specification
.long 0x77 | DW_AT_type
.long .LFB0 | DW_AT_low_pc
.long .LFE0-.LFB0 | DW_AT_high_pc
.uleb128 0x1 | DW_AT_frame_base
.byte 0x9c | DW_OP_call_frame_cfa
.long 0x6a | DW_AT_object_pointer
| DW_AT_GNU_all_call_sites
.long 0x77 | DW_AT_sibling
.uleb128 0x8 | (DIE (0x6a) DW_TAG_formal_parameter)
.long .LASF4 | DW_AT_name: "this"
.long 0x7e | DW_AT_type
| DW_AT_artificial
.uleb128 0x2 | DW_AT_location
.byte 0x91 | DW_OP_fbreg
.sleb128 0
.byte 0 | end of children of DIE 0x4f
.uleb128 0x9 | (DIE (0x77) DW_TAG_base_type)
.byte 0x4 | DW_AT_byte_size
.byte 0x5 | DW_AT_encoding
.ascii "int\0" | DW_AT_name
And this is what I get on ia64:
.uleb128 0x3 // (DIE (0x2f) DW_TAG_subprogram)
// DW_AT_external
.ascii "a1\0" // DW_AT_name
data1 0x1 // DW_AT_decl_file (/usr/local/gcc/gcc-20140129/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C)
data1 0x17 // DW_AT_decl_line
data4.ua @secrel(.LASF2) // DW_AT_linkage_name: "_ZN1A2a1Ev"
data4.ua 0x48 // DW_AT_type
// DW_AT_declaration
data4.ua 0x41 // DW_AT_object_pointer
.uleb128 0x4 // (DIE (0x41) DW_TAG_formal_parameter)
data4.ua 0x4d // DW_AT_type
// DW_AT_artificial
data1 0 // end of children of DIE 0x2f
data1 0 // end of children of DIE 0x25
.uleb128 0x5 // (DIE (0x48) DW_TAG_unspecified_type)
data4.ua @secrel(.LASF3) // DW_AT_name: "auto"
.uleb128 0x6 // (DIE (0x4d) DW_TAG_pointer_type)
data1 0x8 // DW_AT_byte_size
data4.ua 0x25 // DW_AT_type
.uleb128 0x7 // (DIE (0x53) DW_TAG_subprogram)
data4.ua 0x2f // DW_AT_specification
data4.ua 0x85 // DW_AT_type
data8.ua .LFB0 // DW_AT_low_pc
data8.ua .LFE0-.LFB0 // DW_AT_high_pc
data4.ua @secrel(.LLST0) // DW_AT_frame_base
data4.ua 0x78 // DW_AT_object_pointer
// DW_AT_GNU_all_call_sites
data4.ua 0x85 // DW_AT_sibling
.uleb128 0x8 // (DIE (0x78) DW_TAG_formal_parameter)
data4.ua @secrel(.LASF4) // DW_AT_name: "this"
data4.ua 0x8c // DW_AT_type
// DW_AT_artificial
.uleb128 0x2 // DW_AT_location
data1 0x91 // DW_OP_fbreg
.sleb128 0
data1 0 // end of children of DIE 0x53
.uleb128 0x9 // (DIE (0x85) DW_TAG_base_type)
data1 0x4 // DW_AT_byte_size
data1 0x5 // DW_AT_encoding
.ascii "int\0" // DW_AT_name
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Gcc-patches
mailing list