[LLVMbugs] [Bug 11804] New: Assertion violation in EvaluateLValue for compound literal

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 19 10:30:16 PST 2012


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

             Bug #: 11804
           Summary: Assertion violation in EvaluateLValue for compound
                    literal
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: twoodfin at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


const static short* OutputTable[] =
  { (short[]){1,2,3} };

generates an assertion violation when compiled with clang++:

clang: ExprConstant.cpp:913: bool EvaluateLValue(const clang::Expr*,
{anonymous}::LValue&, {anonymous}::EvalInfo&): Assertion `(E->isGLValue() ||
E->getType()->isFunctionType() || E->getType()->isVoidType() ||
isa<CXXTemporaryObjectExpr>(E)) && "can't evaluate expression as an lvalue"'
failed.

clang version 3.1 (trunk 143304)
Target: x86_64-unknown-linux-gnu
Thread model: posix

gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

is happy with the code.

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