+}
+
+/**
+ * Add all method addresses in global new style initializers to the set.
+ *
+ * @note
+ * We do NOT check the type here, just it it's an entity address.
+ * The reason for this is code like:
+ *
+ * void *p = function;
+ *
+ * which is sometimes used to anchor functions.
+ */
+static void add_method_address_inititializer(ir_initializer_t *initializer,
+ eset *set)
+{
+ ir_node *n;
+ size_t i;
+
+ switch (initializer->kind) {
+ case IR_INITIALIZER_CONST:
+ n = initializer->consti.value;
+
+ /* let's check if it's the address of a function */
+ if (is_Global(n)) {
+ ir_entity *ent = get_Global_entity(n);
+
+ if (is_Method_type(get_entity_type(ent)))
+ eset_insert(set, ent);
+ }
+ return;
+ case IR_INITIALIZER_TARVAL:
+ case IR_INITIALIZER_NULL:
+ return;
+ case IR_INITIALIZER_COMPOUND:
+ for (i = 0; i < initializer->compound.n_initializers; ++i) {
+ ir_initializer_t *sub_initializer
+ = initializer->compound.initializers[i];
+ add_method_address_inititializer(sub_initializer, set);
+ }
+ return;
+ }
+ panic("invalid initializer found");