<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Frontend crashes with badly formed c++"
href="http://llvm.org/bugs/show_bug.cgi?id=17700">17700</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Frontend crashes with badly formed c++
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.1
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>oliverbunting@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=11432" name="attach_11432" title="The offending c++">attachment 11432</a> <a href="attachment.cgi?id=11432&action=edit" title="The offending c++">[details]</a></span>
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>