+2009-12-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/42266
+ * cvt.c (convert_from_reference): Do nothing if TREE_TYPE is null.
+
2009-12-03 Dodji Seketeli <dodji@redhat.com>
PR c++/42217
tree
convert_from_reference (tree val)
{
- if (TREE_CODE (TREE_TYPE (val)) == REFERENCE_TYPE)
+ if (TREE_TYPE (val)
+ && TREE_CODE (TREE_TYPE (val)) == REFERENCE_TYPE)
{
tree t = TREE_TYPE (TREE_TYPE (val));
tree ref = build1 (INDIRECT_REF, t, val);
--- /dev/null
+// PR c++/42266
+// { dg-options -std=c++0x }
+
+template<typename... _Elements>
+ class tuple;
+
+template<typename _Arg>
+ class _Mu;
+
+template<typename _Signature>
+ struct _Bind;
+
+template<typename _Functor, typename... _Bound_args>
+ class _Bind<_Functor(_Bound_args...)>
+ {
+ template<typename... _Args, typename
+ = decltype(_Functor()(_Mu<_Bound_args>()(_Bound_args(),
+ tuple<_Args...>())...) )>
+ void __call() { }
+ };
+
+template<typename _Functor, typename _Arg>
+ _Bind<_Functor(_Arg)>
+ bind(_Functor, _Arg) { }
+
+struct State
+{
+ bool ready() { return true; }
+
+ void f()
+ {
+ bind(&State::ready, this);
+ }
+};
+