public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/95806] New: Result of call with reference argument to newed object is cached during constant evaluation @ 2020-06-22 3:17 johelegp at gmail dot com 2020-10-02 22:47 ` [Bug c++/95806] " redi at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: johelegp at gmail dot com @ 2020-06-22 3:17 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95806 Bug ID: 95806 Summary: Result of call with reference argument to newed object is cached during constant evaluation Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/zzM-Qn. ```C++ #include <cassert> constexpr bool is_zero(int& x) { return x == 0; } constexpr void f() { int& x = *new int{0}; assert(is_zero(x)); x = 1; assert(!is_zero(x)); delete &x; } constexpr int x{([]() consteval { f(); }(), 0)}; ``` ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/95806] Result of call with reference argument to newed object is cached during constant evaluation 2020-06-22 3:17 [Bug c++/95806] New: Result of call with reference argument to newed object is cached during constant evaluation johelegp at gmail dot com @ 2020-10-02 22:47 ` redi at gcc dot gnu.org 2021-08-28 20:57 ` wjwray at gmail dot com 2021-08-28 21:17 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: redi at gcc dot gnu.org @ 2020-10-02 22:47 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95806 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2020-10-02 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/95806] Result of call with reference argument to newed object is cached during constant evaluation 2020-06-22 3:17 [Bug c++/95806] New: Result of call with reference argument to newed object is cached during constant evaluation johelegp at gmail dot com 2020-10-02 22:47 ` [Bug c++/95806] " redi at gcc dot gnu.org @ 2021-08-28 20:57 ` wjwray at gmail dot com 2021-08-28 21:17 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: wjwray at gmail dot com @ 2021-08-28 20:57 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95806 Will Wray <wjwray at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wjwray at gmail dot com --- Comment #1 from Will Wray <wjwray at gmail dot com> --- Works on gcc 11 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/95806] Result of call with reference argument to newed object is cached during constant evaluation 2020-06-22 3:17 [Bug c++/95806] New: Result of call with reference argument to newed object is cached during constant evaluation johelegp at gmail dot com 2020-10-02 22:47 ` [Bug c++/95806] " redi at gcc dot gnu.org 2021-08-28 20:57 ` wjwray at gmail dot com @ 2021-08-28 21:17 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-08-28 21:17 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95806 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Dup of bug 99859. *** This bug has been marked as a duplicate of bug 99859 *** ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-28 21:17 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-06-22 3:17 [Bug c++/95806] New: Result of call with reference argument to newed object is cached during constant evaluation johelegp at gmail dot com 2020-10-02 22:47 ` [Bug c++/95806] " redi at gcc dot gnu.org 2021-08-28 20:57 ` wjwray at gmail dot com 2021-08-28 21:17 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).