diff options
author | Richard Guenther <rguenth@gcc.gnu.org> | 2005-06-02 20:09:01 +0000 |
---|---|---|
committer | Richard Guenther <rguenth@gcc.gnu.org> | 2005-06-02 20:09:01 +0000 |
commit | 1856498a7a9eae9024581319a6e2de4f8ca96aae (patch) | |
tree | 36ffef166730228b1ad7255108235c0102376aac /gcc/c-typeck.c | |
parent | 9b180f109dd6d94bc2bdfaa1cf0566113e11b62a (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.c | 5 |
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) { |