* call.c (build_new_op): Call resolve_args before calling
build_over_call.
* g++.dg/template/crash72.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130126
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-11-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/29225
+ * call.c (build_new_op): Call resolve_args before calling
+ build_over_call.
+
2007-11-11 Tom Tromey <tromey@redhat.com>
PR c++/17577:
if (overloaded_p)
*overloaded_p = true;
- result = build_over_call (cand, LOOKUP_NORMAL);
+ if (resolve_args (arglist) == error_mark_node)
+ result = error_mark_node;
+ else
+ result = build_over_call (cand, LOOKUP_NORMAL);
}
else
{
+2007-11-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/29225
+ * g++.dg/template/crash72.C: New test.
+
2007-11-12 Eric Botcazou <ebotcazou@libertysurf.fr>
* g++.dg/opt/cfg5.C: New test.
--- /dev/null
+// PR c++/29225
+// { dg-do compile }
+
+template <typename L, typename R> bool operator< (L x, R y);
+struct T { int t (); };
+class S {};
+
+struct U
+{
+ typedef int (T::* M) ();
+ M m;
+
+ bool operator() (S &x)
+ {
+ T a;
+ return (a.*m) < x; // { dg-error "invalid use of non-static member" }
+ }
+};
+
+void foo (S &x)
+{
+ U m;
+ m.m = &T::t;
+ m (x);
+}