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

            Bug ID: 39764
           Summary: Coroutine optimization change returned value when
                    using proxy type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangb...@nondot.org
          Reporter: sidney.cong...@gmail.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

I implemented a minimal promise type which returns a proxy converted to the
promise's member value when it's returned from the coroutine. This member value
is set by 'co_return' (by implementing 'return_value').

Some optimization seems to elide the local value, so the value set by calling
'co_return' is not returned :
https://wandbox.org/permlink/MdMuxwTjZdmM9xVi

-- 
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