projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b12ef54
)
use the new bitfield types to check for bitfield access; fixes fehler55
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Thu, 2 Aug 2007 11:07:36 +0000
(11:07 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Thu, 2 Aug 2007 11:07:36 +0000
(11:07 +0000)
[r15425]
ir/lower/lower_hl.c
patch
|
blob
|
history
diff --git
a/ir/lower/lower_hl.c
b/ir/lower/lower_hl.c
index
b77fcfd
..
c7df278
100644
(file)
--- a/
ir/lower/lower_hl.c
+++ b/
ir/lower/lower_hl.c
@@
-352,6
+352,10
@@
static void lower_bitfields_loads(ir_node *proj, ir_node *load) {
ent = get_Sel_entity(sel);
bf_type = get_entity_type(ent);
ent = get_Sel_entity(sel);
bf_type = get_entity_type(ent);
+ /* must be a bitfield type */
+ if (!is_Primitive_type(bf_type) || get_primitive_base_type(bf_type) == NULL)
+ return;
+
/* We have a bitfield access, if either a bit offset is given, or
the size is not integral. */
bf_mode = get_type_mode(bf_type);
/* We have a bitfield access, if either a bit offset is given, or
the size is not integral. */
bf_mode = get_type_mode(bf_type);
@@
-441,6
+445,10
@@
static void lower_bitfields_stores(ir_node *store) {
ent = get_Sel_entity(sel);
bf_type = get_entity_type(ent);
ent = get_Sel_entity(sel);
bf_type = get_entity_type(ent);
+ /* must be a bitfield type */
+ if (!is_Primitive_type(bf_type) || get_primitive_base_type(bf_type) == NULL)
+ return;
+
/* We have a bitfield access, if either a bit offset is given, or
the size is not integral. */
bf_mode = get_type_mode(bf_type);
/* We have a bitfield access, if either a bit offset is given, or
the size is not integral. */
bf_mode = get_type_mode(bf_type);