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

           Summary: clang++ crashes with -fshort-enums
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


I have tried to reduce the problem as much as I could:

$ cat clangbug.cc                    
enum E { VALUE_1 };

template <typename T>
static void
foo()
{
    (void)sizeof(T);
}

template <typename T>
struct A {};

template <E Enum>
struct B : A<B<Enum> > {};

static void
bar()
{
    foo<B<VALUE_1> >();
}
$ g++ -fshort-enums -g clangbug.cc -c
$ clang++ -fshort-enums -g clangbug.cc -c
Assertion failed: (I.getBitWidth() == Info.Ctx.getIntWidth(E->getType()) &&
"Invalid evaluation result."), function Success, file ExprConstant.cpp, line
944.
( Many lines of backtrace )

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to