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: unassignedclangb...@nondot.org
          Reporter: eugeni.stepa...@gmail.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to