Commit 4d3baecc by Jason Merrill Committed by Jason Merrill

re PR c++/48749 (internal compiler error: tree check: expected field_decl)

	PR c++/48749
	* class.c (resolves_to_fixed_type_p): Don't look closely
	in templates.

From-SVN: r173412
parent adad1007
2011-05-04 Jason Merrill <jason@redhat.com>
PR c++/48749
* class.c (resolves_to_fixed_type_p): Don't look closely
in templates.
2011-05-03 Paolo Carlini <paolo.carlini@oracle.com> 2011-05-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/28501 PR c++/28501
......
...@@ -5980,7 +5980,17 @@ resolves_to_fixed_type_p (tree instance, int* nonnull) ...@@ -5980,7 +5980,17 @@ resolves_to_fixed_type_p (tree instance, int* nonnull)
{ {
tree t = TREE_TYPE (instance); tree t = TREE_TYPE (instance);
int cdtorp = 0; int cdtorp = 0;
tree fixed = fixed_type_or_null (instance, nonnull, &cdtorp); tree fixed;
if (processing_template_decl)
{
/* In a template we only care about the type of the result. */
if (nonnull)
*nonnull = true;
return true;
}
fixed = fixed_type_or_null (instance, nonnull, &cdtorp);
if (fixed == NULL_TREE) if (fixed == NULL_TREE)
return 0; return 0;
if (POINTER_TYPE_P (t)) if (POINTER_TYPE_P (t))
......
2011-05-04 Jason Merrill <jason@redhat.com>
* g++.dg/conversion/base1.C: New.
2011-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2011-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/48787 PR libgfortran/48787
......
// PR c++/48749
struct Tuple3
{
float x;
};
struct Pos: virtual Tuple3 { };
struct TexCoords
{
Pos pos;
};
template <class T>
void eval (const TexCoords &coords)
{
const Pos &pos = coords.pos;
pos.x;
}
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