Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / g++.dg / lto / pr51992_0.C
blobf75abd281a6b169f2fe775df3fc54484e1c5c3a1
1 // PR c++/51992
2 // { dg-lto-do assemble }
4 template<typename Enum>
5 class QFlags
7     int i;
8 public:
9     inline QFlags(Enum f) : i(f) {}
11 class QString {};
12 class KComponentData;
13 class KConfig
15 public:
16     enum OpenFlag {
17         IncludeGlobals = 0x01,
18         CascadeConfig = 0x02,
19         FullConfig = IncludeGlobals|CascadeConfig
20     };
21     typedef QFlags<OpenFlag> OpenFlags;
23 template <class T>
24 class KSharedPtr {};
25 class KSharedConfig : public KConfig
27 public:
28   typedef KSharedPtr<KSharedConfig> Ptr;
29     static KSharedConfig::Ptr openConfig(const QString& fileName = QString(),
30                                          OpenFlags mode = FullConfig,
31                                          const char *resourceType = "config");
32     static KSharedConfig::Ptr openConfig(const KComponentData &componentData,
33                                          const QString &fileName = QString(),
34                                          OpenFlags mode = FullConfig,
35                                          const char *resourceType = "config");
37 typedef KSharedConfig::Ptr KSharedConfigPtr;
38 namespace KGlobal
40     KComponentData &mainComponent();
42 KSharedConfigPtr KSharedConfig::openConfig(const QString& fileName,
43                                            OpenFlags flags,
44                                            const char *resType)
46     return openConfig(KGlobal::mainComponent(), fileName, flags, resType);
48 KSharedConfigPtr KSharedConfig::openConfig(const KComponentData &componentData,
49                                            const QString& fileName,
50                                            OpenFlags flags,
51                                            const char *resType)
53     return KSharedConfigPtr();