re PR c++/39742 (ice in C++ overload resolution)
PR c++/39742 * call.c (joust): Don't crash on variadic fn. From-SVN: r145995
This commit is contained in:
parent
c03dc1f339
commit
bf89f3a389
|
@ -1,3 +1,8 @@
|
|||
2009-04-12 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/39742
|
||||
* call.c (joust): Don't crash on variadic fn.
|
||||
|
||||
2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
Backport from mainline:
|
||||
|
|
|
@ -6801,6 +6801,9 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn)
|
|||
|
||||
for (i = 0; i < len; ++i)
|
||||
{
|
||||
/* Don't crash if the fn is variadic. */
|
||||
if (!parms1)
|
||||
break;
|
||||
parms1 = TREE_CHAIN (parms1);
|
||||
parms2 = TREE_CHAIN (parms2);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2009-04-12 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/39742
|
||||
* g++.dg/overload/extern-C-2.C: New.
|
||||
|
||||
2009-04-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/39713
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
// PR c++/39742
|
||||
|
||||
void f( int, ...);
|
||||
|
||||
struct S
|
||||
{
|
||||
};
|
||||
|
||||
void
|
||||
g()
|
||||
{
|
||||
void f( int, ...);
|
||||
|
||||
S t;
|
||||
|
||||
f(1, t);
|
||||
}
|
||||
|
||||
void
|
||||
f( int i, ...)
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue