summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C
blob: 81bcb2775aa5517e5750ced3b1962edc9563a69d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Origin: PR debug/45088
// { dg-do compile }
// { dg-options "-g -dA" }
// { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_pointer_type\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_byte_size\[\n\r\]{1,2}\[^\n\r\]*DW_AT_type" 4 } }

struct A
{
    virtual ~A();
};

struct B : public A
{
    virtual ~B(){}
};

struct C : public B
{
    A* a1;
};

int
main()
{
    C c;
    c.a1 = 0;
    return 0;
}