2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr42714.C
blobb1b2d856efc2faf2632ea8f86d454afbb11548e9
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) { }
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;
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       }