re PR c++/29225 (ICE in gimplify_expr, at gimplify.c:4513)
PR c++/29225 * call.c (build_new_op): Call resolve_args before calling build_over_call. * g++.dg/template/crash72.C: New test. From-SVN: r130126
This commit is contained in:
parent
d32034a78d
commit
ffbf581329
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2007-11-11 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
PR c++/17577:
|
PR c++/17577:
|
||||||
|
|
|
@ -3918,7 +3918,10 @@ build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
|
||||||
if (overloaded_p)
|
if (overloaded_p)
|
||||||
*overloaded_p = true;
|
*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
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2007-11-12 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||||
|
|
||||||
* g++.dg/opt/cfg5.C: New test.
|
* g++.dg/opt/cfg5.C: New test.
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
// 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);
|
||||||
|
}
|
Loading…
Reference in New Issue