OSDN Git Service

2010-02-15 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / torture / pr42714.C
1 struct QVectorData {
2     static QVectorData shared_null;
3 };
4 template <typename T> class QVector {
5     union {
6         QVectorData *d;
7     };
8 public:
9     inline QVector() : d(&QVectorData::shared_null) { }
10     inline QVector(const QVector<T> &v) : d(v.d) { }
11 };
12 class QXmlStreamAttribute { };
13 class QXmlStreamAttributes : public QVector<QXmlStreamAttribute> { };
14 class __attribute__ ((visibility("default"))) Smoke {
15 public:
16     union StackItem;
17     typedef StackItem* Stack;
18     typedef short Index;
19 };
20 class SmokeBinding { };
21 namespace __smokeqt {
22     class x_QXmlStreamAttributes : public QXmlStreamAttributes {
23         SmokeBinding* _binding;
24     public:
25         static void x_11(Smoke::Stack x) {
26             x_QXmlStreamAttributes* xret = new x_QXmlStreamAttributes();
27         }
28         explicit x_QXmlStreamAttributes() : QXmlStreamAttributes() { }
29     };
30     void xcall_QXmlStreamAttributes(Smoke::Index xi, void *obj,
31                                     Smoke::Stack args)
32       {
33         switch(xi) {
34             case 11: x_QXmlStreamAttributes::x_11(args);
35         }
36       }
37 }