<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/81745>81745</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
undefined reference to consteval constructor exported from module
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
stbergmann
</td>
</tr>
</table>
<pre>
At least with Clang 17.0.6:
```
$ cat test.cppm
export module M;
export struct S1 { consteval S1(int) {} };
```
```
$ clang++ -std=c++20 test.cppm --precompile
```
```
$ cat test-main.cc
import M;
int main() {
struct S2 { S1 s = 0; };
S2 s;
}
```
```
$ clang++ -std=c++20 test-main.cc -fmodule-file=M=test.pcm test.pcm
/usr/bin/ld: /tmp/test-main-f78021.o: in function `main::S2::S2()':
test-main.cc:(.text+0x33): undefined reference to `S1@M::S1(int)'
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk02OpDoMx09jNhYoOFBULVjAQ-x6VSeAYKryFAIiobvn9qNQX92jGWkWIyGSOInt3z9255y-WOYS8hryJuo2f53X0vme18vUWRv18_CjrDwa7pzHD-2v-J_p7AXoYHu3gKzTIhHJAWQFogFRwUHcv9uSMlSdR8_OJ2pZJrzZ-XOZV4_TPGyG8Q1k_c3u_Lopj-cUoahRzdZ5fu8MnlOgo7Ye6BR2oGgQiuZ5-9fgv8nllnwNVGPs_ACyUbcliS9JxvGyspqnRRv-a9d3zHjqtE2UupPqaSd6IWrrMRwBOj4wdjsiPrlp5z6n6BBkgwJk_Q00nD0Tuhd50fwzCZ4A8Xh7n3gMMsjmDWSza7SoCR-Th-N2cytQ2wew1gwgKwRq_bSE_8NrPBZHQWkyh21tcdys8nq2CAexayIrkNWZnuOuEVDxrK-vCQYjHRPPnx6oFp9ShsOyws0OPGrLA6488spWMfo5BDmnkIm3u_tXMYUI3_WKhlIOJ3nqIi7TQhQnyoQQ0bU8pMVx7JUYcqVGIQpVSDkypUrlLIXKI12SoExQmqU5CSGSseu7vJOqGOUxHweGTPDUaZMY8z4l83qJtHMbl8e0yPLIdD0bt3ckkeUP3DeBKDToWoY7cb9dHGTCaOfdy4vX3nD5B_ZXD-2zUGbzird24wHHdZ7u3Rhtqymv3i9u17cFai_aX7c-UfMU3ta8P4Z4Wef_WXmgds_SAbU7xc8AAAD__xu5P5A">