Commit f36ae628 by Jason Merrill Committed by Jason Merrill

re PR c++/61647 (internal compiler error: in push_access_scope, at cp/pt.c:219…

re PR c++/61647 (internal compiler error: in push_access_scope, at cp/pt.c:219 for a c++ header, clang++ 3.4 generate .pch without error)

	PR c++/61647
	* pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.

From-SVN: r212168
parent cae7c960
2014-06-30 Jason Merrill <jason@redhat.com> 2014-06-30 Jason Merrill <jason@redhat.com>
PR c++/61647
* pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
PR c++/61566 PR c++/61566
* mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL. * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
......
...@@ -21089,7 +21089,12 @@ type_dependent_expression_p (tree expression) ...@@ -21089,7 +21089,12 @@ type_dependent_expression_p (tree expression)
return true; return true;
if (BASELINK_P (expression)) if (BASELINK_P (expression))
expression = BASELINK_FUNCTIONS (expression); {
if (BASELINK_OPTYPE (expression)
&& dependent_type_p (BASELINK_OPTYPE (expression)))
return true;
expression = BASELINK_FUNCTIONS (expression);
}
if (TREE_CODE (expression) == TEMPLATE_ID_EXPR) if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
{ {
......
// PR c++/61647
class XX;
template<typename Container, typename Key>
struct Accessor;
template<typename Container, typename Key, typename KeyStore = Key>
class Variant {
protected:
KeyStore index;
Container state;
public:
Variant(Container st, const Key& i) : index(i), state(st) {}
template<typename T>
operator T() const {
return Accessor<Container, KeyStore>::template get<T>(state, index);
}
};
class AutoCleanVariant : public Variant<XX*, int> {
public:
AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
template<typename T>
operator T() const {
return Variant<XX*, int>::operator 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