[LLVMbugs] [Bug 8795] New: ICE when using a template parameter with sizeof() as initializer

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Dec 15 15:41:43 PST 2010


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

           Summary: ICE when using a template parameter with sizeof() as
                    initializer
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: joerg at NetBSD.org
                CC: llvmbugs at cs.uiuc.edu


Error:
llvm/tools/clang/lib/AST/ExprConstant.cpp:2461: <unnamed>::ICEDiag
CheckICE(const clang::Expr*, clang::ASTContext&): Assertion
`!E->isValueDependent() && "Should not see value dependent exprs!"' failed.

Sample:

template <class _CharT> int test(_CharT t)
{
    int data [] = {
        sizeof(_CharT) > sizeof(char)
    };
    return data[0];
}

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