diff options
author | Andrew Pinski <pinskia@gcc.gnu.org> | 2007-04-30 10:01:18 -0700 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2007-04-30 10:01:18 -0700 |
commit | ab44f2818c38e3ec1897fb8f12d8923d49b394c6 (patch) | |
tree | f862f637a67c0b3826daf74e6d0df59e36b7417c /gcc/tree.c | |
parent | 8f1a19e2c51a192569f3553cbd35ea59499684f8 (diff) | |
download | gcc-ab44f2818c38e3ec1897fb8f12d8923d49b394c6.zip gcc-ab44f2818c38e3ec1897fb8f12d8923d49b394c6.tar.gz gcc-ab44f2818c38e3ec1897fb8f12d8923d49b394c6.tar.bz2 |
[multiple changes]
2007-04-30 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/31721
* tree.c (reconstruct_complex_type): Reconstruct a reference
correctly.
Also use the same mode for the pointer as the old pointer type.
2007-04-30 Andrew pinski <andrew_pinski@playstation.sony.com>
PR C++/31721
* g++.dg/ext/vector7.C: New testcase.
From-SVN: r124300
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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) { |