Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.brendan/groff1.C

raw
1 // { dg-do run }
2 // GROUPS passed groff
3 /* This should compile properly with the new overloading scheme. */
4
5 extern "C" int printf (const char *, ...);
6 extern "C" void exit (int);
7
8 int win = 0;
9
10 class symbol
11 {
12 public:
13 symbol(const char *p, int how = 0) {}
14 symbol() {}
15 };
16
17 class dictionary
18 {
19 public:
20 void lookup(symbol s, void *v=0) { win = 1; }
21 void lookup(const char *) {}
22 };
23
24 int main()
25 {
26 char buf[2048];
27 dictionary exceptions;
28 unsigned char *tem = new unsigned char[19 + 1];
29
30 exceptions.lookup (symbol (buf), tem);
31
32 printf (win ? "PASS\n" : "FAIL\n");
33 exit (! win);
34 }