[LLVMbugs] [Bug 11637] New: C++11 crash with constexpr constructor and string literal

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Dec 21 14:34:48 PST 2011


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

             Bug #: 11637
           Summary: C++11 crash with constexpr constructor and string
                    literal
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu,
                    richard-llvm at metafoo.co.uk
    Classification: Unclassified


Testcase:

struct A { char a[4]; constexpr A() : a{"foo"} {} };
constexpr int x = A().a[0];

Result:

Assertion failed: (Result.Val.isInt() && "pointer cast to int is not an ICE"),
function EvaluateCPlusPlus11IntegralConstantExpr, file
/Volumes/storage/llvm/tools/clang/lib/AST/ExprConstant.cpp, line 5367.

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