[LLVMbugs] [Bug 17700] New: Frontend crashes with badly formed c++

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Oct 26 04:51:54 PDT 2013


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

            Bug ID: 17700
           Summary: Frontend crashes with badly formed c++
           Product: clang
           Version: 3.1
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: oliverbunting at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11432
  --> http://llvm.org/bugs/attachment.cgi?id=11432&action=edit
The offending c++

The parser crashes with some poorly formed c++. The crash only occurs with the
-std=c++11 flag set

***************************************************************
Debug report: *.ii

# 1 "test.cpp"
# 1 "test.cpp" 1
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 141 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "test.cpp" 2


int main(){

   enum class A : unsigned char {FOO = 0, BAR = 1};

   typedef struct BitField {
     constexpr BitField (A a, unsigned char b) :
        a(a),
        b(b)
     {};
        a(a),
        b(b)
   }
     A a : 1;
     unsigned char b : 7;
   } BitField;

   BitField bitfield = {A::FOO,5};

};

*************************************************************
Debug report *.sh

 "/usr/local/bin/clang-3.1" -cc1 -triple i386-pc-linux-gnu -emit-obj
-mrelax-all -disable-free -main-file-name test.cpp -mrelocation-model static
-mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu pentium4
-momit-leaf-frame-pointer -coverage-file test.o -resource-dir
/usr/local/bin/../lib/clang/3.1 -fmodule-cache-path /var/tmp/clang-module-cache
-internal-isystem /usr/lib/gcc/i686-linux-gnu/4.6/../../../../include/c++/4.6
-internal-isystem
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../include/c++/4.6/i686-linux-gnu
-internal-isystem
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../include/c++/4.6/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/bin/../lib/clang/3.1/include -internal-externc-isystem
/usr/include/i386-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /home/ollie/projects/test -ferror-limit 19
-fmessage-length 113 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c++ test.cpp

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131026/8b56d0cc/attachment.html>


More information about the llvm-bugs mailing list