commit 9febd1e3a2af987ecd1a62417b8948f679550254
Author: Jason Merrill <jason@redhat.com>
Date: Wed Jan 25 11:14:30 2012 -0500
PR c++/51992
* tree.c (find_decls_types_in_node): Walk gimple_call_fntype.
new file mode 100644
@@ -0,0 +1,53 @@
+// PR c++/51992
+// { dg-lto-do assemble }
+
+template<typename Enum>
+class QFlags
+{
+ int i;
+ inline QFlags(Enum f) : i(f) {}
+};
+class QString {};
+class KComponentData;
+class KConfig
+{
+public:
+ enum OpenFlag {
+ IncludeGlobals = 0x01,
+ CascadeConfig = 0x02,
+ FullConfig = IncludeGlobals|CascadeConfig
+ };
+ typedef QFlags<OpenFlag> OpenFlags;
+};
+template <class T>
+class KSharedPtr {};
+class KSharedConfig : public KConfig
+{
+public:
+ typedef KSharedPtr<KSharedConfig> Ptr;
+ static KSharedConfig::Ptr openConfig(const QString& fileName = QString(),
+ OpenFlags mode = FullConfig,
+ const char *resourceType = "config");
+ static KSharedConfig::Ptr openConfig(const KComponentData &componentData,
+ const QString &fileName = QString(),
+ OpenFlags mode = FullConfig,
+ const char *resourceType = "config");
+};
+typedef KSharedConfig::Ptr KSharedConfigPtr;
+namespace KGlobal
+{
+ KComponentData &mainComponent();
+};
+KSharedConfigPtr KSharedConfig::openConfig(const QString& fileName,
+ OpenFlags flags,
+ const char *resType)
+{
+ return openConfig(KGlobal::mainComponent(), fileName, flags, resType);
+}
+KSharedConfigPtr KSharedConfig::openConfig(const KComponentData &componentData,
+ const QString& fileName,
+ OpenFlags flags,
+ const char *resType)
+{
+ return KSharedConfigPtr();
+}
@@ -5037,6 +5037,9 @@ find_decls_types_in_node (struct cgraph_node *n, struct free_lang_data_d *fld)
{
gimple stmt = gsi_stmt (si);
+ if (is_gimple_call (stmt))
+ find_decls_types (gimple_call_fntype (stmt), fld);
+
for (i = 0; i < gimple_num_ops (stmt); i++)
{
tree arg = gimple_op (stmt, i);