[llvm-bugs] [Bug 31472] New: newGVN miscompilation of std::vector

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 26 08:22:36 PST 2016


            Bug ID: 31472
           Summary: newGVN miscompilation of  std::vector
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: matthias.krueger at famsik.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

llvm @ 5825ccc67d75632b370cfd03e3493ccbda885ed8 /  git-svn-id:

I applied https://reviews.llvm.org/D28059 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 http://en.cppreference.com/w/cpp/container/vector with 
"-std=c++0x -mllvm -enable-newgvn"   and it would output "7 0 0 0" instead of
"7 5 16 8"

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/20161226/46f3644c/attachment.html>

More information about the llvm-bugs mailing list