Date: Fri, 24 Jun 2022 19:12:11 +0000 From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 264877] clang-14 fails with unreasonable cryptic message on a valid C++ code Message-ID: <bug-264877-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264877 Bug ID: 264877 Summary: clang-14 fails with unreasonable cryptic message on a valid C++ code Product: Base System Version: 13.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: toolchain@FreeBSD.org Reporter: yuri@freebsd.org Attachment #234920 text/plain mime type: Created attachment 234920 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D234920&action= =3Dedit test.cpp The attached testcase fails in clang-14, but not in clang-13 and earlier. Failure message: > $ clang++14 test.cpp > ld: error: undefined hidden symbol: std::__1::enable_if<(is_move_construc= tible<int>::value) && (is_move_assignable<int>::value), void>::type std::__= 1::swap<int>(int&, int&) > >>> referenced by test.cpp > >>> /tmp/test-e3003a.o:(main) > clang-14: error: linker command failed with exit code 1 (use -v to see in= vocation) '#include <stdexcept>' is not a proper header for std::swap, so a correct outcome should be one of these two: * fail to find std::swap -- error: no member named 'swap' in namespace 'std' * succeed (through proxy header inclusion) The above error message is incorrect and irrelevant. It indicates a problem= in the toolchain. This is a regression in clang-14. The problem was discovered due to a failure in science/helfem on 14-CURRENT. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-264877-29464>