1 // { dg-do assemble }
2 //
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 24 Jul 2001 <nathan@codesourcery.com>
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
foo(bool a)22 void foo (bool a)
23 {
24 x << (a ? OVL1 : OVL2); // { dg-error "" } incomplete type
25 a ? OVL1 : OVL2; // { dg-error "" } incomplete type
26 }
27