[LLVMbugs] [Bug 3212] New: Violated assertion in clang revision 60757

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Dec 15 10:15:46 PST 2008


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

           Summary: Violated assertion in clang revision 60757
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bagnara at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu


$ wget http://people.csail.mit.edu/smcc/projects/single-file-programs/gcc.c.bz2
$ bunzip2 gcc.c.bz2
$ ~/clang/dest/bin/clang -w gcc.c 
gcc.c:2422:10: note: previous definition is here
# define MIN(a, b) ((a) < (b) ? (a) : (b))
         ^
gcc.c:2421:10: note: previous definition is here
# define MAX(a, b) ((a) > (b) ? (a) : (b))
         ^
clang: /home/roberto/clang/src/include/llvm/Support/Casting.h:199: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
clang::CXXRecordDecl, Y = clang::RecordDecl*]: Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed.
0   clang     0x08c35835
1   libc.so.6 0x00b3d8b1 abort + 257
2   libc.so.6 0x00b353ce __assert_fail + 238
3   clang     0x086ba484
Aborted (core dumped)
$ 

Here is a (not very informative) backtrace:

(gdb) info stack
#0  0x00110402 in __kernel_vsyscall ()
#1  0x00b3bfa0 in raise () from /lib/libc.so.6
#2  0x00b3d8b1 in abort () from /lib/libc.so.6
#3  0x00b353ce in __assert_fail () from /lib/libc.so.6
#4  0x086ba484 in clang::BuiltinCandidateTypeSet::AddTypesConvertedFrom ()
#5  0x00295e25 in ?? ()
#6  0x00000001 in ?? ()
#7  0x0910ddb0 in ?? ()
#8  0xb7ea000d in ?? ()
#9  0xb7eac45c in ?? ()
#10 0x090b6398 in ?? ()
#11 0x090aefd1 in ?? ()
#12 0x00000001 in ?? ()
#13 0xbf9bf5cc in ?? ()
#14 0xbf9c1a40 in ?? ()
#15 0x00000002 in ?? ()
#16 0x086be233 in clang::Sema::AddBuiltinOperatorCandidates ()
#17 0x00000020 in ?? ()
(gdb)


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