[LLVMbugs] [Bug 2414] New: typedefed funtion type check assert

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jun 4 10:23:26 PDT 2008


           Summary: typedefed funtion type check assert
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: csaba.hruska at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=1708)
 --> (http://llvm.org/bugs/attachment.cgi?id=1708)
buggy code

buggy code:

typedef void filter_func_t();
filter_func_t mono_filter;

void addfilter2(filter_func_t *func){}

void setup_filters()
        addfilter2( mono_filter);

ccc -c player.c
clang -emit-llvm-bc -x c -o player.o player.c
clang: /media/disk/download/llvm/svn/llvm/include/llvm/Support/Casting.h:199:
typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
clang::FunctionType, Y = clang::QualType]: Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed.

gcc compiles it.

system: 32 bit x86 ubuntu hardy
clang and llvm version: At revision 51948.

Csaba Hruska

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