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

Dimitry Andric <[email protected]> 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|                            |[email protected]
           Assignee|[email protected]       |[email protected]

--- Comment #5 from Dimitry Andric <[email protected]> ---
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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "[email protected]"

Reply via email to