Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
57e10dc3
Commit
57e10dc3
authored
Oct 06, 2015
by
Matthias Braun
Browse files
begnuas: It is not allowed to ask an alias entity for an initializer
parent
ea4b6f75
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/begnuas.c
View file @
57e10dc3
...
...
@@ -392,6 +392,8 @@ static bool entity_is_string_const(const ir_entity *ent, bool only_suffix_null)
static
bool
entity_is_zero_initialized
(
ir_entity
const
*
entity
)
{
if
(
is_alias_entity
(
entity
))
return
false
;
ir_initializer_t
*
initializer
=
get_entity_initializer
(
entity
);
return
initializer
!=
NULL
&&
initializer_is_null
(
initializer
);
}
...
...
@@ -931,6 +933,9 @@ static unsigned long compute_entity_size(ir_entity const *const entity)
{
ir_type
*
const
type
=
get_entity_type
(
entity
);
unsigned
long
size
=
get_type_size_bytes
(
type
);
if
(
is_alias_entity
(
entity
))
return
size
;
/* Note that for variable array/compound types we may have to inspect the
* initializer to get the actual size */
ir_initializer_t
const
*
const
initializer
=
get_entity_initializer
(
entity
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment