[llvm-bugs] [Bug 36750] Meyers' singleton does not work with [[gnu::pure]] and -O1 to -O3
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 20 12:57:27 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=36750
Eli Friedman <efriedma at codeaurora.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |---
Status|RESOLVED |REOPENED
--- Comment #7 from Eli Friedman <efriedma at codeaurora.org> ---
s_myClass is a global variable, and myClass() modifies it, so it's not pure.
At least, that's how it works from LLVM's perspective.
If that doesn't actually match gcc's behavior, we could possibly change LLVM, I
guess? But we'd need more evidence gcc actually implements a different rule.
--
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/20180320/533e297f/attachment.html>
More information about the llvm-bugs
mailing list