[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / cross-project-tests / debuginfo-tests / llgdb-tests / sret.cpp
blob28f057b4e9b569432ce89cd962625c548ab3ed13
1 // RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
2 // RUN: %clangxx %target_itanium_abi_host_triple %t.o -o %t.out
3 // RUN: %test_debuginfo %s %t.out
4 // XFAIL: !system-darwin && gdb-clang-incompatibility
5 // Radar 8775834
6 // DEBUGGER: break 63
7 // DEBUGGER: r
8 // DEBUGGER: p a
9 // CHECK: ${{[0-9]+}} =
10 // LLDB does not print artificial members.
11 // CHECK: {{(_vptr\$A =)?.*}}m_int = 12
13 class A
15 public:
16 A (int i=0);
17 A (const A& rhs);
18 const A&
19 operator= (const A& rhs);
20 virtual ~A() {}
22 int get_int();
24 protected:
25 int m_int;
28 A::A (int i) :
29 m_int(i)
33 A::A (const A& rhs) :
34 m_int (rhs.m_int)
38 const A &
39 A::operator =(const A& rhs)
41 m_int = rhs.m_int;
42 return *this;
45 int A::get_int()
47 return m_int;
50 class B
52 public:
53 B () {}
55 A AInstance();
59 B::AInstance()
61 A a(12);
62 return a;
65 int main (int argc, char const *argv[])
67 B b;
68 int return_val = b.AInstance().get_int();
70 A a(b.AInstance());
71 return return_val;