1 | // RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -o %t -c |
2 | // RUN: %clangxx %target_itanium_abi_host_triple %t -o %t.out |
3 | // RUN: %test_debuginfo %s %t.out |
4 | // XFAIL: gdb-clang-incompatibility |
5 | |
6 | // DEBUGGER: delete breakpoints |
7 | // DEBUGGER: break static-member-2.cpp:36 |
8 | // DEBUGGER: r |
9 | // DEBUGGER: ptype C |
10 | // CHECK: {{struct|class}} C { |
11 | // CHECK: static const int a |
12 | // CHECK-NEXT: static int b; |
13 | // CHECK-NEXT: static int c; |
14 | // CHECK: int d; |
15 | // CHECK-NEXT: } |
16 | // DEBUGGER: p C::a |
17 | // CHECK: 4 |
18 | // DEBUGGER: p C::c |
19 | // CHECK: 15 |
20 | |
21 | // PR14471, PR14734 |
22 | |
23 | class C { |
24 | public: |
25 | const static int a = 4; |
26 | static int b; |
27 | static int c; |
28 | int d; |
29 | }; |
30 | |
31 | int C::c = 15; |
32 | const int C::a; |
33 | |
34 | int main() { |
35 | C instance_C; |
36 | return C::a; |
37 | } |
38 | |