<html>
<head>
<base href="https://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 --- - newGVN miscompilation of std::vector"
href="https://llvm.org/bugs/show_bug.cgi?id=31472">31472</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>newGVN miscompilation of std::vector
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>matthias.krueger@famsik.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>llvm @ 5825ccc67d75632b370cfd03e3493ccbda885ed8 / git-svn-id:
<a href="https://llvm.org/svn/llvm-project/llvm/trunk@290542">https://llvm.org/svn/llvm-project/llvm/trunk@290542</a>
91177308-0d34-0410-b5e6-96231b3b80d8
I applied <a href="https://reviews.llvm.org/D28059">https://reviews.llvm.org/D28059</a> manually on top.
I tried to compile the following sample
#include <iostream>
#include <vector>
int main()
{
// Create a vector containing integers
std::vector<int> v = {7, 5, 16, 8};
// Iterate and print values of vector
for(int n : v) {
std::cout << n << '\n';
}
}
reduced from <a href="http://en.cppreference.com/w/cpp/container/vector">http://en.cppreference.com/w/cpp/container/vector</a> with
"-std=c++0x -mllvm -enable-newgvn" and it would output "7 0 0 0" instead of
"7 5 16 8"</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>