[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


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

           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);
}

error:
ccc -c player.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.
clang[0x837f828]
/lib/tls/i686/cmov/libc.so.6(abort+0x101)[0xb7d10a01]
/lib/tls/i686/cmov/libc.so.6(__assert_fail+0xee)[0xb7d0810e]
clang[0x81184b5]

gcc compiles it.

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

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