mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-20 19:01:12 +08:00
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:
parent
6312fca0d9
commit
0f8a770633
@ -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
|
||||
|
@ -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-12 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
PR preprocessor/31869
|
||||
|
22
gcc/testsuite/g++.dg/overload/extern-C-2.C
Normal file
22
gcc/testsuite/g++.dg/overload/extern-C-2.C
Normal 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, ...)
|
||||
{
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user