aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenth@gcc.gnu.org>2005-06-02 20:09:01 +0000
committerRichard Guenther <rguenth@gcc.gnu.org>2005-06-02 20:09:01 +0000
commit1856498a7a9eae9024581319a6e2de4f8ca96aae (patch)
tree36ffef166730228b1ad7255108235c0102376aac /gcc/c-typeck.c
parent9b180f109dd6d94bc2bdfaa1cf0566113e11b62a (diff)
2005-06-02 Richard Guenther <rguenth@gcc.gnu.org>
* c-typeck.c (build_indirect_ref): Build INDIRECT_REF with correct type. * gcc.dg/wtypequal.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@100512 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 00f701093ec..694eb696947 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -1638,12 +1638,9 @@ build_indirect_ref (tree ptr, const char *errorstring)
else
{
tree t = TREE_TYPE (type);
- tree mvt = t;
tree ref;
- if (TREE_CODE (mvt) != ARRAY_TYPE)
- mvt = TYPE_MAIN_VARIANT (mvt);
- ref = build1 (INDIRECT_REF, mvt, pointer);
+ ref = build1 (INDIRECT_REF, t, pointer);
if (!COMPLETE_OR_VOID_TYPE_P (t) && TREE_CODE (t) != ARRAY_TYPE)
{