[llvm-bugs] [Bug 25169] New: Undefined behavior in tuple_cat / make_tuple

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 13 14:28:56 PDT 2015


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

            Bug ID: 25169
           Summary: Undefined behavior in tuple_cat / make_tuple
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

I'm not really sure that the problem is in <tuple>, but I don't see anything
wrong with my code, and it works as expected with libstdc++.

$ cat 1.cc

#include <cstdio>
#include <tuple>

int main()
{
  auto t1 = std::tuple_cat(std::make_tuple(std::make_tuple(1)));
  return std::get<0>(std::get<0>(t1));
}

$ clang -stdlib=libc++ -std=c++14 -O2 1.cc -S -emit-llvm -o -

define i32 @main() #0 {
entry:
  ret i32 undef
}

The tuple is undef.

-- 
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/20151013/83f1e1eb/attachment.html>


More information about the llvm-bugs mailing list