]>
Commit | Line | Data |
---|---|---|
b96fe38e DS |
1 | // Contributed by Dodji Seketeli <dodji@redhat.com> |
2 | // Origin PR debug/39706 | |
9730bc27 | 3 | // { dg-do compile { target *-*-darwin* } } |
c0389e92 | 4 | // { dg-options "-g -dA -fno-merge-debug-strings" } |
c0389e92 DS |
5 | // |
6 | // There should be one debug_pubnames section generated. | |
7 | // On Darwin though, there is also a label pointing at the begining of the | |
8 | // debug_pubnames section. The assembly code of that label adds an occurence | |
9 | // of section declaration assembly. So on Darwin, we need to check for two | |
10 | // occurences of the debug_pubnames section declaration. | |
11 | // { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 1 { target { ! *-*-darwin* } } } } | |
12 | // { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 2 { target { *-*-darwin* } } } } | |
13 | // | |
14 | // Then check of the presence of the names we are interested in. | |
15 | // { dg-final { scan-assembler-times "\"main.0\".*external name" 1 } } | |
b96fe38e DS |
16 | // { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } } |
17 | // { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } } | |
18 | ||
19 | namespace ns { int ns_x; } | |
20 | class y { public: static int y_x; }; | |
21 | int y::y_x; | |
22 | int main() { return ns::ns_x; } |