copy_entity_own(): assert if the new type has already a fixed layout
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Mon, 10 Mar 2008 10:36:25 +0000 (10:36 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Mon, 10 Mar 2008 10:36:25 +0000 (10:36 +0000)
[r18034]

ir/tr/entity.c

index 6e1e7b3..541fd26 100644 (file)
@@ -264,6 +264,7 @@ copy_entity_own(ir_entity *old, ir_type *new_owner) {
        ir_entity *newe;
        assert(is_entity(old));
        assert(is_compound_type(new_owner));
+       assert(get_type_state(new_owner) != layout_fixed);
 
        if (old->owner == new_owner) return old;
        newe = xmalloc(sizeof(*newe));