https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227941

Dimitry Andric <d...@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open
            Summary|llvm crash when compiling   |clang assertion when
                   |specific code               |compiling C++ code with
                   |                            |-fblocks
           See Also|                            |https://bugs.llvm.org/show_
                   |                            |bug.cgi?id=37328
                 CC|                            |d...@freebsd.org
           Assignee|toolch...@freebsd.org       |d...@freebsd.org

--- Comment #5 from Dimitry Andric <d...@freebsd.org> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to