mangle-unnamed.cpp [plain text]
struct S {
virtual ~S() { }
};
static struct : S { } obj8;
void f() {
static struct : S { } obj8;
}
inline int f2() {
static struct { int a() { static int x; return ++x; } } obj;
return obj.a();
}
int f3() { return f2(); }
struct A {
typedef struct { int x; } *ptr;
ptr m;
int a() {
static struct x {
int a(ptr A::*memp) { static int x; return ++x; }
} a;
return a.a(&A::m);
}
};
int f4() { return A().a(); }
int f5() {
static union {
int a;
};
return a;
}
int f6() {
static union {
union {
int : 1;
};
int b;
};
return b;
}
int f7() {
static union {
union {
int b;
} a;
};
return a.b;
}
enum { T8 };
template <class T> struct Test8 {
typedef T type;
Test8(type t) {} };
template <class T> void make_test8(T value) { Test8<T> t(value); }
void test8() { make_test8(T8); }
typedef volatile struct {
void test9() volatile {}
} Test9;
void test9() {
Test9 a;
a.test9();
}