summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C
blob: b1c5401da0711ba2eaa59e9fff4a75992e64b8c8 (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
29
// 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 } }

template<class T>
struct A
{
    virtual ~A();
};

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

struct C : public B
{
    A<int>* a1;
};

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