re PR c++/39742 (ice in C++ overload resolution)

PR c++/39742
	* call.c (joust): Don't crash on variadic fn.

From-SVN: r145994
This commit is contained in:
Jason Merrill 2009-04-13 00:04:58 -04:00 committed by Jason Merrill
parent 6312fca0d9
commit 0f8a770633
4 changed files with 35 additions and 0 deletions

View File

@ -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 Jason Merrill <jason@redhat.com>
PR c++/28301

View File

@ -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);
}

View File

@ -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-12 Joseph Myers <joseph@codesourcery.com>
PR preprocessor/31869

View File

@ -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, ...)
{
}