| 1 |
// { dg-do assemble } |
| 2 |
// |
| 3 |
// Copyright (C) 2001 Free Software Foundation, Inc. |
| 4 |
// Contributed by Nathan Sidwell 24 Jul 2001 <[email protected]> |
| 5 |
|
| 6 |
// Bug 3416. We left some unchecked overloaded functions lying around. |
| 7 |
|
| 8 |
struct X |
| 9 |
{ |
| 10 |
void operator << (int); |
| 11 |
void operator << (float); |
| 12 |
}; |
| 13 |
|
| 14 |
void OVL1 (int); |
| 15 |
void OVL1 (float); |
| 16 |
|
| 17 |
void OVL2 (int); |
| 18 |
void OVL2 (float); |
| 19 |
|
| 20 |
X x; |
| 21 |
|
| 22 |
void foo (bool a) |
| 23 |
{ |
| 24 |
x << (a ? OVL1 : OVL2); // { dg-error "" } incomplete type |
| 25 |
a ? OVL1 : OVL2; // { dg-error "" } incomplete type |
| 26 |
} |