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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 26 05:40:26 PDT 2012


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

             Bug #: 13466
           Summary: Assertion `isa<X>(Val) && "cast<Ty>() argument of
                    incompatible type!"' failed.
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: magnus.reftel at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8951
  --> http://llvm.org/bugs/attachment.cgi?id=8951
Reduced testcase and log

Since sometime after 160757 but no later than 160775, the belowprogram crashes
the analyzer. The issue in bug 13440 also triggers the same assert, but the
failing cases do not seem related.


enum e {
        E_A,
        E_B,
        E_C,
        E_D
};

struct s {
        int ints[E_D+1];
};

static int call_assert(struct s* s) {
        int i = 0;
        s?(void)0:__assert_fail(0, 0, 0, 0);
}

static void start(struct s* s) {
        enum e e;
        for(e = E_A; e <= E_D; e++) {
                if(uninteresting_1()) {
                        if (uninteresting_2() && s->ints[e])
                                uninteresting_3();
                        if (call_assert(s))
                                e;
                }
        }
}

-- 
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