Open mgibson-antithesis opened 2 weeks ago
Could you please try 19 or main
branch? https://godbolt.org should be helpful.
Same problem on 19.
[nix-shell:~/tmp/clang_bug]$ clang++ --version
clang version 19.1.0-rc3
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/sr89lhln99zkbzynqw7m1lmb445b6lx3-clang-19.1.0-rc3/bin
[nix-shell:~/tmp/clang_bug]$ clang++ -std=c++20 *.cpp
`.rodata._ZTAXtlN12_GLOBAL__N_112fixed_stringILm10EEEtlNSt3__15arrayIcLm10EEEtlA10_cLc83ELc97ELc109ELc101ELc32ELc110ELc97ELc109ELc101EEEEE' referenced in section `.data' of /tmp/foo-5b74f8.o: defined in discarded section `.rodata._ZTAXtlN12_GLOBAL__N_112fixed_stringILm10EEEtlNSt3__15arrayIcLm10EEEtlA10_cLc83ELc97ELc109ELc101ELc32ELc110ELc97ELc109ELc101EEEEE[_ZTAXtlN12_GLOBAL__N_112fixed_stringILm10EEEtlNSt3__15arrayIcLm10EEEtlA10_cLc83ELc97ELc109ELc101ELc32ELc110ELc97ELc109ELc101EEEEE]' of /tmp/foo-5b74f8.o
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
The following compiles and links correctly with clang++16:
Command line is: