| 1 |
// { dg-additional-options "-fmodules-ts -fdump-lang-module-blocks" } |
| 2 |
|
| 3 |
export module bob; |
| 4 |
// { dg-module-cmi bob } |
| 5 |
|
| 6 |
export struct peeker |
| 7 |
{ |
| 8 |
static int peek (void *); |
| 9 |
}; |
| 10 |
|
| 11 |
|
| 12 |
export class hidey |
| 13 |
{ |
| 14 |
protected: |
| 15 |
int key; |
| 16 |
|
| 17 |
public: |
| 18 |
hidey (int key) :key (key) |
| 19 |
{ |
| 20 |
} |
| 21 |
|
| 22 |
friend class peeker; |
| 23 |
}; |
| 24 |
|
| 25 |
export class secret : public hidey |
| 26 |
{ |
| 27 |
public: |
| 28 |
secret (int key) : hidey (key) |
| 29 |
{ |
| 30 |
} |
| 31 |
}; |
| 32 |
|
| 33 |
// hidey, peeker & secret are all in different clusters |
| 34 |
|
| 35 |
// { dg-final { scan-lang-dump {Cluster members:\n \[0\]=decl definition '::peeker'\n( \[.\]=[^\n]*'\n)* \[.\]=binding '::peeker'} module } } |
| 36 |
// { dg-final { scan-lang-dump {Cluster members:\n \[0\]=decl definition '::hidey'\n( \[.\]=[^\n]*'\n)* \[.\]=binding '::hidey'} module } } |
| 37 |
// { dg-final { scan-lang-dump {Cluster members:\n \[0\]=decl definition '::secret'\n( \[.\]=[^\n]*'\n)* \[.\]=binding '::secret'} module } } |