Commit 2226e997 by Mark Mitchell Committed by Mark Mitchell

re PR c++/21352 (ICE with passing template function type as template type)

	PR c++/21352
	* pt.c (build_non_dependent_expr): Use is_overloaded_fn.

	PR c++/21352
	* g++.dg/template/crash37.C: New test.

From-SVN: r99281
parent 43ac1934
2005-05-05 Mark Mitchell <mark@codesourcery.com>
PR c++/21352
* pt.c (build_non_dependent_expr): Use is_overloaded_fn.
2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
* pt.c: Fix a comment typo.
......
......@@ -12505,10 +12505,7 @@ build_non_dependent_expr (tree expr)
types. */
inner_expr = (TREE_CODE (expr) == ADDR_EXPR ?
TREE_OPERAND (expr, 0) : expr);
if (TREE_CODE (inner_expr) == OVERLOAD
|| TREE_CODE (inner_expr) == FUNCTION_DECL
|| TREE_CODE (inner_expr) == TEMPLATE_DECL
|| TREE_CODE (inner_expr) == TEMPLATE_ID_EXPR
if (is_overloaded_fn (inner_expr)
|| TREE_CODE (inner_expr) == OFFSET_REF)
return expr;
/* There is no need to return a proxy for a variable. */
......
2005-05-05 Mark Mitchell <mark@codesourcery.com>
PR c++/21352
* g++.dg/template/crash37.C: New test.
2005-05-05 Paul Brook <paul@codesourcery.com>
* gcc.dg/arm-g2.c: Use effective-target arm32.
......
// PR c++/21352
struct coperator_stack
{
template<class type>
void push3()
{
}
};
struct helper {};
template<class F>
void bla(F f)
{
}
template <typename ScannerT>
struct definition
{
definition()
{
bla(coperator_stack::push3<helper>); // { dg-error "" }
}
};
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