OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [debug/] [dwarf2/] [nested-2.C] - Blame information for rev 698

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/*
2
  Origin: PR debug/45024
3
  { dg-options "-g -dA -fno-merge-debug-strings" }
4
  { dg-do compile }
5
*/
6
 
7
struct S {
8
  template struct T { };
9
};
10
 
11
S::T tval;
12
 
13
/*
14
We want to express that the DIE of S::T must be a child of the DIE of S, like in assembly this output:
15
 
16
        .uleb128 0x2    # (DIE (0x9e) DW_TAG_structure_type)
17
        .ascii "S\0"    # DW_AT_name
18
        .byte   0x1     # DW_AT_byte_size
19
        .byte   0x1     # DW_AT_decl_file (../../prtests/test-PR45024.cc)
20
        .byte   0x1     # DW_AT_decl_line
21
        .long   0xbc    # DW_AT_sibling
22
        .uleb128 0x3    # (DIE (0xa8) DW_TAG_structure_type)
23
        .ascii "T\0"    # DW_AT_name
24
        .byte   0x1     # DW_AT_byte_size
25
        .byte   0x1     # DW_AT_decl_file (../../prtests/test-PR45024.cc)
26
        .byte   0x2     # DW_AT_decl_line
27
        .uleb128 0x4    # (DIE (0xb3) DW_TAG_template_type_param)
28
        .ascii "Z\0"    # DW_AT_name
29
        .long   0xbc    # DW_AT_type
30
        .byte   0        # end of children of DIE 0xa8
31
        .byte   0        # end of children of DIE 0x9e
32
 
33
Hence the slightly odd regexp:
34
 
35
  { dg-final { scan-assembler "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"S\\\\0\"\[ \t\]+\(\[@|#;!\]|//?\)\[ \t\]+DW_AT_name\[\n\r\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"T\\\\0\"\[ \t\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_template_type_param\\)\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\(\[@|#;!\]|//?\)\[ \t\]+end of children of DIE\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of children of DIE\[^\n\r\]*" } }
36
 
37
 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.