[LLVMbugs] [Bug 23099] New: std::future regression

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 1 12:28:18 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23099

            Bug ID: 23099
           Summary: std::future regression
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dirk.ribbrock at mathematik.tu-dortmund.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Since using clang 3.6.0, the following code crashes with
"Illegal instruction (core dumped)"
Whereas clang 3.5.0  returns the correct output value "1"

//file future.cpp
#include <thread>
#include <future>
#include <iostream>

int bla()
{
  return 1;
}

int main()
{
  std::future<int> f = std::async(std::launch::async, bla);
  f.wait();
  std::cout<<f.get()<<std::endl;
  return 0;
}
//end file

Build it with
clang++ --std=c++11 -lpthread future.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/20150401/e523294a/attachment.html>


More information about the llvm-bugs mailing list