[LLVMbugs] [Bug 14229] New: Clang crashes when enum values are declared to be bitwise ORs of values from different enum

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 31 11:27:28 PDT 2012


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

             Bug #: 14229
           Summary: Clang crashes when enum values are declared to be
                    bitwise ORs of values from different enum
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ryan.molden at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9474
  --> http://llvm.org/bugs/attachment.cgi?id=9474
The repro code to crash clang

I think the summary says it all. When you have two enums, with the second
settings its member values to be bitwise ORing of the first's values clang
crashes on compile.  Simplified repro attached. It doesn't appear to want to
allow me to attach multiple items, or I can't figure out how. So the .sh file
produced is just this:

"c:/llvm_build/bin/Debug/clang.exe" -cc1 -triple i686-pc-win32 -emit-obj
-mrelax-all -disable-free -main-file-name oaidl_crash.cpp -mrelocation-model
static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-target-cpu pentium4 -momit-leaf-frame-pointer Files\\Microsoft Visual Studio
10.0\\VC\\INCLUDE" Files\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\INCLUDE"
Files\\Microsoft SDKs\\Windows\\v7.0A\\include" -std=c++11 -fdeprecated-macro
-ferror-limit 19 -fmessage-length 80 -mstackrealign -fms-extensions
-fms-compatibility -fmsc-version=1300 -fdelayed-template-parsing
-fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -x c++
oaidl_crash-502326.cpp

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