only query primitive types for their base type
authorMatthias Braun <matze@braunis.de>
Mon, 6 Oct 2008 18:54:52 +0000 (18:54 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 6 Oct 2008 18:54:52 +0000 (18:54 +0000)
[r22549]

ast2firm.c

index e3520bd..e5a38a0 100644 (file)
@@ -3733,7 +3733,8 @@ static void create_dynamic_initializer_sub(ir_initializer_t *initializer,
                ir_type *ent_type = get_entity_type(entity);
 
                /* is it a bitfield type? */
-               if (get_primitive_base_type(ent_type) != NULL) {
+               if (is_Primitive_type(ent_type) &&
+                               get_primitive_base_type(ent_type) != NULL) {
                        bitfield_store_to_firm(dbgi, entity, base_addr, node, false);
                        return;
                }
@@ -3752,7 +3753,8 @@ static void create_dynamic_initializer_sub(ir_initializer_t *initializer,
                ir_type *ent_type = get_entity_type(entity);
 
                /* is it a bitfield type? */
-               if (get_primitive_base_type(ent_type) != NULL) {
+               if (is_Primitive_type(ent_type) &&
+                               get_primitive_base_type(ent_type) != NULL) {
                        bitfield_store_to_firm(dbgi, entity, base_addr, cnst, false);
                        return;
                }