aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2014-06-09 17:07:24 +0200
committerMarc Glisse <glisse@gcc.gnu.org>2014-06-09 15:07:24 +0000
commit00f30445f42d7a01e60455deaa9c7db23508099d (patch)
treee4d103486cf728d06df6c25f7d915f0955754d23 /gcc/tree.c
parent109a3af40faf2fe7b93cefcdca45029714fe800d (diff)
downloadgcc-00f30445f42d7a01e60455deaa9c7db23508099d.zip
gcc-00f30445f42d7a01e60455deaa9c7db23508099d.tar.gz
gcc-00f30445f42d7a01e60455deaa9c7db23508099d.tar.bz2
re PR c++/54442 (Const overloads resolution failure)
2014-06-09 Marc Glisse <marc.glisse@inria.fr> PR c++/54442 gcc/ * tree.c (build_qualified_type): Use a canonical type for TYPE_CANONICAL. gcc/testsuite/ * g++.dg/pr54442.C: New file. From-SVN: r211377
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 9d8e631..7c1dbd5 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -6326,8 +6326,10 @@ build_qualified_type (tree type, int type_quals)
else if (TYPE_CANONICAL (type) != type)
/* Build the underlying canonical type, since it is different
from TYPE. */
- TYPE_CANONICAL (t) = build_qualified_type (TYPE_CANONICAL (type),
- type_quals);
+ {
+ tree c = build_qualified_type (TYPE_CANONICAL (type), type_quals);
+ TYPE_CANONICAL (t) = TYPE_CANONICAL (c);
+ }
else
/* T is its own canonical type. */
TYPE_CANONICAL (t) = t;