view gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// Origin: PR debug/45088
// { dg-do compile }
// { dg-options "-gdwarf-2 -dA -fno-debug-types-section" }
// { 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;
}