-
Notifications
You must be signed in to change notification settings - Fork 13.6k
C++17: [Boost-1.83.0] Assertion failure while parsing MemInitializer of a constructor #65568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
duplicate
Resolved as duplicate
needs-reduction
Large reproducer that should be reduced into a simpler form
Comments
@llvm/issue-subscribers-clang-frontend |
Is this yet another duplicate of #39319 ? |
Indeed, this assertion is also solved by https://reviews.llvm.org/D148474, same as #39319. |
freebsd-git
pushed a commit
to freebsd/freebsd-src
that referenced
this issue
Mar 20, 2024
[Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision ResolveConstructorOverload needs to check properly if we are going to use copy elision we can't use a conversion function. This fixes: llvm/llvm-project#39319 llvm/llvm-project#60182 llvm/llvm-project#62157 llvm/llvm-project#64885 llvm/llvm-project#65568 Differential Revision: https://reviews.llvm.org/D148474 This should fix 'Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!")' errors when building devel/boost-libs, specifically libs/url/src/segments_view.cpp. Bump __FreeBSD_version so this fix can easily be detected from devel/boost-all/compiled.mk. PR: 273335
freebsd-git
pushed a commit
to freebsd/freebsd-src
that referenced
this issue
Mar 23, 2024
[Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision ResolveConstructorOverload needs to check properly if we are going to use copy elision we can't use a conversion function. This fixes: llvm/llvm-project#39319 llvm/llvm-project#60182 llvm/llvm-project#62157 llvm/llvm-project#64885 llvm/llvm-project#65568 Differential Revision: https://reviews.llvm.org/D148474 This should fix 'Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!")' errors when building devel/boost-libs, specifically libs/url/src/segments_view.cpp. Bump __FreeBSD_version so this fix can easily be detected from devel/boost-all/compiled.mk. PR: 273335 (cherry picked from commit bcd401b)
freebsd-git
pushed a commit
to freebsd/freebsd-src
that referenced
this issue
Mar 23, 2024
[Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision ResolveConstructorOverload needs to check properly if we are going to use copy elision we can't use a conversion function. This fixes: llvm/llvm-project#39319 llvm/llvm-project#60182 llvm/llvm-project#62157 llvm/llvm-project#64885 llvm/llvm-project#65568 Differential Revision: https://reviews.llvm.org/D148474 This should fix 'Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!")' errors when building devel/boost-libs, specifically libs/url/src/segments_view.cpp. Bump __FreeBSD_version so this fix can easily be detected from devel/boost-all/compiled.mk. PR: 273335 (cherry picked from commit bcd401b)
bsdjhb
pushed a commit
to bsdjhb/cheribsd
that referenced
this issue
Aug 5, 2024
[Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision ResolveConstructorOverload needs to check properly if we are going to use copy elision we can't use a conversion function. This fixes: llvm/llvm-project#39319 llvm/llvm-project#60182 llvm/llvm-project#62157 llvm/llvm-project#64885 llvm/llvm-project#65568 Differential Revision: https://reviews.llvm.org/D148474 This should fix 'Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!")' errors when building devel/boost-libs, specifically libs/url/src/segments_view.cpp. Bump __FreeBSD_version so this fix can easily be detected from devel/boost-all/compiled.mk. PR: 273335
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
duplicate
Resolved as duplicate
needs-reduction
Large reproducer that should be reduced into a simpler form
Building Boost-1.83.0 Libraries with latest clang compiler fails.
Note: Build of the Boost-1.83.0 Libraries succeeds with cxxstd=14 instead of cxxstd=17.
$ clang++ --version
clang version 18.0.0 (https://github.com/llvm/llvm-project.git c0703ea)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/tpki/compilers/aocc/up2-dbg/bin
$ clang++ repro.cpp -O3 -std=c++20
...
clang-18: /home/tpki/llvm-flang-src/llvm-project1/llvm/include/llvm/Support/Casting.h:578: decltype(auto) llvm::cast(From *) [To = clang::CXXConstructExpr, From = clang::Expr]: Assertion `isa
(Val) && "cast() argument of incompatible type!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/tpki/llvm-flang-src/llvm-project1/install_dbg/bin/clang-18 -cc ....
#0 0x00007f7104a65c7d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/tpki/llvm-flang-src/llvm-project1/llvm/lib/Support/Unix/Signals.inc:723:11
#1 0x00007f7104a6616b PrintStackTraceSignalHandler(void*) /home/tpki/llvm-flang-src/llvm-project1/llvm/lib/Support/Unix/Signals.inc:798:1
#2 0x00007f7104a641d6 llvm::sys::RunSignalHandlers() /home/tpki/llvm-flang-src/llvm-project1/llvm/lib/Support/Signals.cpp:105:5
#3 0x00007f7104a66925 SignalHandler(int) /home/tpki/llvm-flang-src/llvm-project1/llvm/lib/Support/Unix/Signals.inc:413:1
#4 0x00007f7104160520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#5 0x00007f71041b4a7c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#6 0x00007f71041b4a7c __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#7 0x00007f71041b4a7c pthread_kill ./nptl/pthread_kill.c:89:10
#8 0x00007f7104160476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#9 0x00007f71041467f3 abort ./stdlib/abort.c:81:7
#10 0x00007f710414671b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#11 0x00007f7104157e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#12 0x00007f70fd321018 decltype(auto) llvm::cast<clang::CXXConstructExpr, clang::Expr>(clang::Expr*) /home/tpki/llvm-flang-src/llvm-project1/llvm/include/llvm/Support/Casting.h:579:10
#13 0x00007f70fd53db82 clang::Sema::BuildDelegatingInitializer(clang::TypeSourceInfo*, clang::Expr*, clang::CXXRecordDecl*) /home/tpki/llvm-flang-src/llvm-project1/clang/lib/Sema/SemaDeclCXX.
cpp:4720:5
#14 0x00007f70fd53d01c clang::Sema::BuildBaseInitializer(clang::QualType, clang::TypeSourceInfo*, clang::Expr*, clang::CXXRecordDecl*, clang::SourceLocation) /home/tpki/llvm-flang-src/llvm-pr
oject1/clang/lib/Sema/SemaDeclCXX.cpp:4801:14
repro.tar.gz
The text was updated successfully, but these errors were encountered: