Commit 00f30445 by Marc Glisse Committed by Marc Glisse

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
parent 109a3af4
2014-06-09 Marc Glisse <marc.glisse@inria.fr>
PR c++/54442
* tree.c (build_qualified_type): Use a canonical type for
TYPE_CANONICAL.
2014-06-09 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/arm/arm-modes.def: Remove XFmode.
......
2014-06-09 Marc Glisse <marc.glisse@inria.fr>
PR c++/54442
* g++.dg/pr54442.C: New file.
2014-06-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/61406
......
/* { dg-do compile } */
struct S
{
void s (int) const throw ();
void s (int) throw ();
};
typedef int index_t;
void (S::*f) (index_t) = &S::s;
void (S::*g) (index_t) const = &S::s;
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment