| 1 |
// { dg-do run } |
| 2 |
|
| 3 |
#include <string.h> |
| 4 |
|
| 5 |
const char *ct, *dt, *cv; |
| 6 |
|
| 7 |
struct KLASS |
| 8 |
{ |
| 9 |
KLASS () ; |
| 10 |
~KLASS (); |
| 11 |
operator int (); |
| 12 |
}; |
| 13 |
|
| 14 |
KLASS::KLASS() |
| 15 |
{ |
| 16 |
ct = __builtin_FUNCTION (); |
| 17 |
} |
| 18 |
|
| 19 |
KLASS::~KLASS () |
| 20 |
{ |
| 21 |
dt = __builtin_FUNCTION (); |
| 22 |
} |
| 23 |
|
| 24 |
KLASS::operator int () |
| 25 |
{ |
| 26 |
cv = __builtin_FUNCTION (); |
| 27 |
return 0; |
| 28 |
} |
| 29 |
|
| 30 |
int main () |
| 31 |
{ |
| 32 |
int q = int (KLASS ()); |
| 33 |
|
| 34 |
if (strcmp (ct, "KLASS")) |
| 35 |
return 1; |
| 36 |
if (strcmp (dt, "~KLASS")) |
| 37 |
return 2; |
| 38 |
if (strcmp (cv, "operator int")) |
| 39 |
return 3; |
| 40 |
|
| 41 |
return 0; |
| 42 |
} |