aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 626f8e4..fbaeb73 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -7236,11 +7236,18 @@ tree
reconstruct_complex_type (tree type, tree bottom)
{
tree inner, outer;
-
- if (POINTER_TYPE_P (type))
+
+ if (TREE_CODE (type) == POINTER_TYPE)
+ {
+ inner = reconstruct_complex_type (TREE_TYPE (type), bottom);
+ outer = build_pointer_type_for_mode (inner, TYPE_MODE (type),
+ TYPE_REF_CAN_ALIAS_ALL (type));
+ }
+ else if (TREE_CODE (type) == REFERENCE_TYPE)
{
inner = reconstruct_complex_type (TREE_TYPE (type), bottom);
- outer = build_pointer_type (inner);
+ outer = build_reference_type_for_mode (inner, TYPE_MODE (type),
+ TYPE_REF_CAN_ALIAS_ALL (type));
}
else if (TREE_CODE (type) == ARRAY_TYPE)
{