[llvm-bugs] [Bug 28503] New: Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!"

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 11 09:00:29 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28503

            Bug ID: 28503
           Summary: Assertion failed: isa<X>(Val) && "cast<Ty>() argument
                    of incompatible type!"
           Product: clang
           Version: 3.8
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jtony at ca.ibm.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Steps to reproduce on linux:
-bash-4.2$ cat r.cpp
  template <class ...U> struct T {
        int bar() throw(U...)
        {
                return sizeobar...(U);
        }
};

template <class ...U> auto bar(U... args) -> T<decltype(args)...>
{
        return T<decltype(args)...>();
}

int main()
{
if ( bar ( bar<> ) . bar ( ) )
        return 0;
}

-bash-4.2$ myclang++ r.cpp  -std=c++11
r.cpp:4:10: error: use of undeclared identifier 'sizeobar'; did you mean
'sizeof'?
                return sizeobar...(U);
                       ^~~~~~~~
                       sizeof
clang: /home/jtony/build/3_8/llvm-dev.src/include/llvm/Support/Casting.h:237:
typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [wit
h X = clang::TemplateTemplateParmDecl; Y = clang::NamedDecl; typename
llvm::cast_retty<X, Y*>::ret_type = clang::TemplateTemplateParmDecl*]:
 Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
0  clang     0x000000001568c4e4 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 68
1  clang     0x000000001568c8d4


...
clang version 3.8.0 (tags/RELEASE_380/final)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix


-bash-4.2$ type myclang
myclang is aliased to `/home/jtony/build/runnable/bin/clang'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160711/44de62d4/attachment.html>


More information about the llvm-bugs mailing list