[LLVMbugs] [Bug 13985] New: llvm::SimplifyCFG Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 1 03:57:49 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13985

             Bug #: 13985
           Summary: llvm::SimplifyCFG Assertion `isa<X>(Val) &&
                    "cast<Ty>() argument of incompatible type!"' failed.
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kcc at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


clang r164932, 64-bit linux. reduced by creduce from real code. 

clang -c -O2 z0.cc 

clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free
-main-file-name z0.cc -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64
-momit-leaf-frame-pointer -v  -O2 -fdeprecated-macro -fdebug-compilation-dir
/home/kcc/tmp -ferror-limit 19 -fmessage-length 232 -mstackrealign
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o z0.o -x c++ z0.cc 


void foo (bool);
int x;
void
fn1 () {
  bool integer;
  switch (x) {
  case 0:
  case 1:
    integer = 1;
    break;
  case 7:
  case 8:
    integer = 0;
  }
  foo (integer);
}



clang: /home/kcc/llvm/include/llvm/Support/Casting.h:197: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
llvm::ConstantInt, Y = llvm::Constant*]: Assertion `isa<X>(Val) && "cast<Ty>()
argument of incompatible type!"' failed.
...
10 clang           0x0000000000fd92a6 llvm::SimplifyCFG(llvm::BasicBlock*,

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list