Issue |
81745
|
Summary |
undefined reference to consteval constructor exported from module
|
Labels |
new issue
|
Assignees |
|
Reporter |
stbergmann
|
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)'
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs