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

            Bug ID: 50652
           Summary: [Coroutine] Coroutine Elide would eliminate user
                    provided new even if it had side effects
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2b
          Assignee: unassignedclangb...@nondot.org
          Reporter: yedeng...@linux.alibaba.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

Example: https://godbolt.org/z/cx4fbzvqb

In this example, user provided a operator new with side effects (print). From
the language side, the program should print the times we create coroutine
frame. However, since the compiler made coroutine elision optimization, all the
call to provided new are removed. So from the language side, it looks like a
compiler bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to