| 1 |
// { dg-do compile } |
| 2 |
|
| 3 |
extern "C" { |
| 4 |
void __assert_fail (); |
| 5 |
__SIZE_TYPE__ strlen (const char *); |
| 6 |
} |
| 7 |
class A |
| 8 |
{ |
| 9 |
int Data; |
| 10 |
int Length; |
| 11 |
|
| 12 |
public: |
| 13 |
A (const char *p1) : Data () |
| 14 |
{ |
| 15 |
p1 ? void() : __assert_fail (); |
| 16 |
Length = strlen (p1); |
| 17 |
} |
| 18 |
}; |
| 19 |
enum TokenKind |
| 20 |
{ |
| 21 |
semi |
| 22 |
}; |
| 23 |
class B |
| 24 |
{ |
| 25 |
public: |
| 26 |
void m_fn1 (); |
| 27 |
}; |
| 28 |
class C |
| 29 |
{ |
| 30 |
void m_fn2 (TokenKind, int, A); |
| 31 |
struct D |
| 32 |
{ |
| 33 |
D (int); |
| 34 |
B Range; |
| 35 |
}; |
| 36 |
int *m_fn3 (const int &, int &, int **); |
| 37 |
}; |
| 38 |
int a, b; |
| 39 |
int * |
| 40 |
C::m_fn3 (const int &, int &, int **) |
| 41 |
{ |
| 42 |
D c (0); |
| 43 |
if (a) |
| 44 |
c.Range.m_fn1 (); |
| 45 |
m_fn2 (semi, 0, b ? "" : a ? "alias declaration" : "using declaration"); |
| 46 |
return 0; |
| 47 |
} |