You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue which I believe to be a bug in clang. The compilation fails during linking, and with some minor modifications to the code, clang crashes. Unfortunately, when I was coming up with the reduced version, I maintained the linker failure but lost the clang crash. Hopefully an investigation into the problem which I kept can fix both. If you can verify that this is a bug (and not a programming mistake on my part), I will take the time to produce the crash report.
I have attached all relevant code files: files.zip The issue appears to be coming from the vector parameter of Foo::noo (in previous tests, I observed that when the parameter is replaced with a bool or a vector of some other type, the error goes away. Interesting that Bar* is permitted as a return, but not as a specialization of vector.)
The error I am getting looks like this:
[10/10] Linking CXX executable modules-test
FAILED: modules-test
: && /home/mmoult/Build/llvm-project-llvmorg-18.1.1/build/bin/clang++ -g CMakeFiles/build.dir/main.cpp.o CMakeFiles/build.dir/foo.cpp.o CMakeFiles/build.dir/bar.cxx.o CMakeFiles/build.dir/foo.cxx.o -o modules-test && :
/usr/bin/ld: CMakeFiles/build.dir/foo.cpp.o: in function `Foo@foo::doo()':
/home/mmoult/git/test/foo.cpp:10: undefined reference to `Foo@foo::num'
/usr/bin/ld: CMakeFiles/build.dir/bar.cxx.o: in function `Bar@bar::call() const':
/home/mmoult/git/test/bar.cxx:12: undefined reference to `Foo@foo::num'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
The version of CMake I am using is 3.29.0-rc4, found at https://cmake.org/download/ (version 3.29.0-rc3 produced the same error).
The version of Ninja I am using is 1.11.1
The version of clang I am using is:
clang version 18.1.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/mmoult/Build/llvm-project-llvmorg-18.1.1/build/bin
Thanks for your consideration.
The text was updated successfully, but these errors were encountered:
I encountered an issue which I believe to be a bug in clang. The compilation fails during linking, and with some minor modifications to the code, clang crashes. Unfortunately, when I was coming up with the reduced version, I maintained the linker failure but lost the clang crash. Hopefully an investigation into the problem which I kept can fix both. If you can verify that this is a bug (and not a programming mistake on my part), I will take the time to produce the crash report.
I have attached all relevant code files: files.zip The issue appears to be coming from the vector parameter of
Foo::noo
(in previous tests, I observed that when the parameter is replaced with a bool or a vector of some other type, the error goes away. Interesting that Bar* is permitted as a return, but not as a specialization of vector.)The error I am getting looks like this:
The command I ran on Debian is:
The version of CMake I am using is 3.29.0-rc4, found at https://cmake.org/download/ (version 3.29.0-rc3 produced the same error).
The version of Ninja I am using is 1.11.1
The version of clang I am using is:
Thanks for your consideration.
The text was updated successfully, but these errors were encountered: