<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61427>61427</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[C++20] [Modules] The entity with internal linkage shouldn't be accessed in other TU even if they are in the same module
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:modules
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ChuanqiXu9
</td>
</tr>
</table>
<pre>
Reproducer:
```
export module m:a;
static int a = 32;
```
```
export module m:b;
import :a;
int b() {
return a;
}
```
Currently the reproducer is accepted. But we expect the compiler to reject it and saying that the partition b can't access the static variable 'a' in partition a.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkk9vnDwQxj_NcBllBTZ_DxyyWe3tvbxKpV4HmAW3xlB7nGS_fQW7SdoeqkoIhJ-Zx6PfPBSCGR1zC8URilNCUabFt09TJPfDfI1N0i3Dtf2fV78MsWcP-hHSE6Tv7zK9P_svv62LF5yXIVrGGfQjgT7etCAkpkfjBAlBn1CrD-0Pm3_07j76zbxrv923XdSBqkE1CNX9EBHRs0Tv8LMSqtNfxniK3rMTe0WZGP0HCTQBqe95FR4OeIyCr4z8tnIve2W_zKux7BFlQc_ftnMjSG7AQFfjRpSJbqUreTFiFocd9uRAVbJbh7DLd3Iv5A11lhFURaAqNO6XTjokQ6uHRjeUcJuVVV2XKmvyZGqLqu-HS9c3WdcopfuSqNY1ZzVnl6HJOTGtSpVOdVakpS51fii6VDUDFbm-NLUqOshTnsnYg7Uv82HxY2JCiNyWWa6qxFLHNuwRUqq35EbQj7c9BVBqy5Vvt86HLo4B8tSaIOHTS4zYPYFPoI6gjiqF4oRQHP-7exQnfJ4Y2YmRK74ambYYsXdk0Rr3nUbGMC3RDjd2Hd_x8bBBWmRij89fkF_YoblsUK9InjdxB0wzvwcrid62k8gatqirM6jzaGSK3aFfZlDnber752H1y7ZWUOcdRwB13on8DAAA__8olgb2">