Commit 4b4a42c4 by Jason Merrill Committed by Jason Merrill

re PR c++/42567 ([C++0x] ICE with auto in type_unification_real, at cp/pt.c:13310)

	PR c++/42567
	* semantics.c (describable_type): Remove decltype comment and
	semantics.

From-SVN: r155627
parent 5805e48d
2010-01-04 Jason Merrill <jason@redhat.com>
PR c++/42567
* semantics.c (describable_type): Remove decltype comment and
semantics.
Copyright (C) 2010 Free Software Foundation, Inc. Copyright (C) 2010 Free Software Foundation, Inc.
......
...@@ -4690,10 +4690,8 @@ finish_static_assert (tree condition, tree message, location_t location, ...@@ -4690,10 +4690,8 @@ finish_static_assert (tree condition, tree message, location_t location,
} }
} }
/* Returns decltype((EXPR)) for cases where we can drop the decltype and /* Returns the type of EXPR for cases where we can determine it even though
just return the type even though EXPR is a type-dependent expression. EXPR is a type-dependent expression. */
The ABI specifies which cases this applies to, which is a subset of the
possible cases. */
tree tree
describable_type (tree expr) describable_type (tree expr)
...@@ -4717,8 +4715,7 @@ describable_type (tree expr) ...@@ -4717,8 +4715,7 @@ describable_type (tree expr)
case PARM_DECL: case PARM_DECL:
case RESULT_DECL: case RESULT_DECL:
case FUNCTION_DECL: case FUNCTION_DECL:
/* Named rvalue reference becomes lvalue. */ return TREE_TYPE (expr);
type = build_reference_type (non_reference (TREE_TYPE (expr)));
break; break;
case NEW_EXPR: case NEW_EXPR:
......
2010-01-04 Jason Merrill <jason@redhat.com>
PR c++/42567
* g++.dg/cpp0x/auto17.C: New.
2010-01-04 Rafael Avila de Espindola <espindola@google.com> 2010-01-04 Rafael Avila de Espindola <espindola@google.com>
* gcc.dg/lto/20100104_0.c: New. * gcc.dg/lto/20100104_0.c: New.
......
// PR c++/42567
// { dg-options "-std=c++0x" }
template<typename B>
struct A {
template<typename C>
void fn(C c) {
auto& key = *c;
}
};
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