[llvm-bugs] [Bug 50652] New: [Coroutine] Coroutine Elide would eliminate user provided new even if it had side effects

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 10 00:53:23 PDT 2021


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: unassignedclangbugs at nondot.org
          Reporter: yedeng.yd at linux.alibaba.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210610/2760c273/attachment.html>


More information about the llvm-bugs mailing list