Debian Codegraph @

gcc/testsuite/g++.dg/eh/anon2.C

raw
1 // Test that the anonymous namespace isn't mangled with random characters,
2 // but also doesn't get mixed up with an anonymous namespace in another
3 // translation unit.
4 // { dg-final { scan-assembler "\\*N12_GLOBAL__N_11AE" } }
5
6 namespace {
7 struct A
8 {
9 virtual void f();
10 };
11
12 void A::f() { }
13 }
14
15 extern void g();
16
17 int main()
18 {
19 try {
20 try {
21 g();
22 } catch (A) { __builtin_abort(); }
23 } catch (...) { }
24 }