[llvm-bugs] [Bug 49675] New: Coroutine miscompile
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 22 03:41:51 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49675
Bug ID: 49675
Summary: Coroutine miscompile
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++2a
Assignee: unassignedclangbugs at nondot.org
Reporter: michal.chojnowski at scylladb.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
clang miscompiles (misoptimizes?) coroutines.
Here's a minimal example for clang 11.0.1: https://godbolt.org/z/EYE16d
Here's a minimal example for both 11.0.1 and trunk:
https://godbolt.org/z/7nPG39
The bug only occurs with optimizations enabled. `opt-bisect-limit` shows that
the linked test cases break after `BISECT: running pass (64) Combine redundant
instructions on function (_Z3foo1A)`. I didn't confirm that this particular
pass is the culprit though; maybe it only makes an earlier miscompile apparent.
Perhaps this bug is not coroutine-specific. However, we have encountered this
miscompile (we aren't certain that the root cause is always the same, but they
all look related) in practice several unrelated times with coroutines, and
never without coroutines.
I also mentioned this case under https://bugs.llvm.org/show_bug.cgi?id=48857,
but I'm opening a separate bug because I'm not actually sure that it's related
to the original case in 48857.
--
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/20210322/384b7a7f/attachment.html>
More information about the llvm-bugs
mailing list