aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index bae21a0..0e2032c 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3568,6 +3568,24 @@ push_fields_onto_fieldstack (tree type, VEC(fieldoff_s,heap) **fieldstack,
{
tree field;
int count = 0;
+
+ if (TREE_CODE (type) == COMPLEX_TYPE)
+ {
+ fieldoff_s *real_part, *img_part;
+ real_part = VEC_safe_push (fieldoff_s, heap, *fieldstack, NULL);
+ real_part->type = TREE_TYPE (type);
+ real_part->size = TYPE_SIZE (TREE_TYPE (type));
+ real_part->offset = offset;
+ real_part->decl = NULL_TREE;
+
+ img_part = VEC_safe_push (fieldoff_s, heap, *fieldstack, NULL);
+ img_part->type = TREE_TYPE (type);
+ img_part->size = TYPE_SIZE (TREE_TYPE (type));
+ img_part->offset = offset + TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (type)));
+ img_part->decl = NULL_TREE;
+
+ return 2;
+ }
for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
if (TREE_CODE (field) == FIELD_DECL)