Summary: | clang assertion when compiling C++ code with -fblocks | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | neal | ||||
Component: | bin | Assignee: | Dimitry Andric <dim> | ||||
Status: | Open --- | ||||||
Severity: | Affects Some People | CC: | bugmeister, dim, toolchain | ||||
Priority: | --- | ||||||
Version: | 11.1-RELEASE | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
See Also: | https://bugs.llvm.org/show_bug.cgi?id=37328 | ||||||
Attachments: |
|
Description
neal
2018-05-03 01:09:57 UTC
Also, forgot to mention, this same code also crashes llvm on Darwin, so a radar:39926584 has also been reported by me. (In reply to neal from comment #0) > Preprocessed source(s) and associated run script(s) are located at: > c++: note: diagnostic msg: /tmp/main-8ed6cc.cpp > c++: note: diagnostic msg: /tmp/main-8ed6cc.sh Maybe attach main.cpp or compiler preprocessed source. Created attachment 193022 [details]
llvm crash output
minus the llvm .core file, it's bigger than allowed.
Sorry about that. I missed that the attachment with the .core file didn't make it because of size. I can reproduce, also with newer versions of clang. If assertions are enabled, it gives: Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm/include/llvm/Support/Casting.h, line 255. Minimized test case: // clang -cc1 -triple x86_64-- -S -fblocks bug227941-min.cpp class a { public: template <class b> a(b); }; class { public: int c(a); } d; void f() { __attribute__((__blocks__(byref))) int e = d.c([] {}); } Submitted upstream as: https://bugs.llvm.org/show_bug.cgi?id=37328 ^Triage: to submitter: is this still a problem in modern versions of clang? |