- do not kick inner functions from the frame type
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Mon, 19 Jan 2009 20:55:54 +0000 (20:55 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Mon, 19 Jan 2009 20:55:54 +0000 (20:55 +0000)
[r25271]

ir/opt/opt_frame.c

index b985540..dd41fd7 100644 (file)
@@ -87,7 +87,8 @@ void opt_frame_irg(ir_graph *irg) {
        list = NULL;
        for (i = n - 1; i >= 0; --i) {
                ent = get_class_member(frame_tp, i);
-               if (get_entity_link(ent) == NULL) {
+               /* beware of inner functions: those are NOT unused */
+               if (get_entity_link(ent) == NULL && !is_method_entity(ent)) {
                        set_entity_link(ent, list);
                        list = ent;
                }