| 1 |
// { dg-lto-do compile } |
| 2 |
extern "C" |
| 3 |
{ |
| 4 |
extern long unsigned int strlen (__const char *__s); |
| 5 |
} |
| 6 |
class Cstring |
| 7 |
{ |
| 8 |
}; |
| 9 |
class Foobar_Out |
| 10 |
{ |
| 11 |
virtual void put_to_buf (const char *str, long unsigned int msg_len); |
| 12 |
void put_to_buf (const char *str) |
| 13 |
{ |
| 14 |
put_to_buf (str, strlen (str)); |
| 15 |
} |
| 16 |
Foobar_Out & operator << (const char *str); |
| 17 |
Foobar_Out & operator << (const Cstring & cstring); |
| 18 |
}; |
| 19 |
|
| 20 |
class Foobar_Log:public Foobar_Out |
| 21 |
{ |
| 22 |
Foobar_Log (int channel); |
| 23 |
virtual void put_to_buf (const char *str, long unsigned int msg_len); |
| 24 |
}; |
| 25 |
Foobar_Out & Foobar_Out::operator << (const char *str) |
| 26 |
{ |
| 27 |
put_to_buf (str); |
| 28 |
} |
| 29 |
|
| 30 |
Foobar_Out & Foobar_Out::operator << (const Cstring & cstring) |
| 31 |
{ |
| 32 |
return *this; |
| 33 |
} |
| 34 |
|
| 35 |
Foobar_Log::Foobar_Log (int ch) |
| 36 |
{ |
| 37 |
} |