[Issue 21822] New: Optimizer flowlv() does not account for OPmemcmp and OPstrcmp
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 12 10:03:28 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21822
Issue ID: 21822
Summary: Optimizer flowlv() does not account for OPmemcmp and
OPstrcmp
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
The following:
char[4] sun();
bool moon() {
auto a = sun();
auto b = sun();
return a == b; // generates OPmemcmp
}
may be incorrectly compiled when optimized because the flowlv() function in the
optimizer does not account for the OPmemcmp or OPstrcmp intermediate code
operators.
This problem was exposed by https://github.com/dlang/dmd/pull/12409
--
More information about the Digitalmars-d-bugs
mailing list