[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-09 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #34 from Toni Neubert --- Thank you both! Now everything works. :) I'll keep that in mind.

[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Jakub Jelinek changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-08 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #32 from Jason Merrill --- Author: jason Date: Wed Jan 8 20:31:20 2020 New Revision: 280018 URL: https://gcc.gnu.org/viewcvs?rev=280018&root=gcc&view=rev Log: PR c++/91369 - constexpr destructor and member initializer. Prev

[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Jakub Jelinek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org --- Comm

[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #30 from Jakub Jelinek --- (In reply to Toni Neubert from comment #28) > I have another test case which fails. (Maybe more..., I am sorry). No need to be sorry, your input is very valuable. Anyway, for the #c28 testcase (using struct

[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-06 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #29 from Jakub Jelinek --- Author: jakub Date: Tue Jan 7 07:13:50 2020 New Revision: 279943 URL: https://gcc.gnu.org/viewcvs?rev=279943&root=gcc&view=rev Log: PR c++/91369 * constexpr.c (struct constexpr_global_ctx):

[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-06 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #28 from Toni Neubert --- Thank you very much again for your fast help. Your patch works for this test case. I have another test case which fails. (Maybe more..., I am sorry). //main.cpp: in ‘constexpr’ expansion of ‘test3()’ //main

[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #27 from Jakub Jelinek --- Created attachment 47590 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47590&action=edit gcc10-pr91369-2.patch Untested patch.

[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Jakub Jelinek changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

[Bug c++/91369] Implement P0784R7: constexpr new

2020-01-03 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #25 from Toni Neubert --- I get: "deallocation of already deallocated storage" for test2() but compiling just test1() or test2() is just fine. struct a { constexpr a(int* i) : i{i} { } constexpr ~a() {

[Bug c++/91369] Implement P0784R7: constexpr new

2019-12-04 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #24 from Toni Neubert --- Great thank you.

[Bug c++/91369] Implement P0784R7: constexpr new

2019-12-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Jakub Jelinek changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

[Bug c++/91369] Implement P0784R7: constexpr new

2019-12-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #22 from Jakub Jelinek --- Author: jakub Date: Tue Dec 3 19:27:47 2019 New Revision: 278945 URL: https://gcc.gnu.org/viewcvs?rev=278945&root=gcc&view=rev Log: PR c++/91369 * constexpr.c (struct constexpr_global_ctx):

[Bug c++/91369] Implement P0784R7: constexpr new

2019-12-01 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Toni Neubert changed: What|Removed |Added CC||lutztonineubert at gmail dot com --- Com

[Bug c++/91369] Implement P0784R7: constexpr new

2019-11-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #20 from Jakub Jelinek --- Author: jakub Date: Fri Nov 1 23:26:17 2019 New Revision: 277732 URL: https://gcc.gnu.org/viewcvs?rev=277732&root=gcc&view=rev Log: PR c++/91369 - Implement P0784R7: constexpr new * cp-tree

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #19 from Jakub Jelinek --- Author: jakub Date: Wed Oct 30 21:55:12 2019 New Revision: 277649 URL: https://gcc.gnu.org/viewcvs?rev=277649&root=gcc&view=rev Log: PR c++/91369 - Implement P0784R7: constexpr new * constex

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #18 from Jonathan Wakely --- Author: redi Date: Wed Oct 23 17:42:11 2019 New Revision: 277342 URL: https://gcc.gnu.org/viewcvs?rev=277342&root=gcc&view=rev Log: PR c++/91369 Implement P0784R7 changes to allocation and construction T

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #17 from Jakub Jelinek --- Ok, so do I need to somehow mark the CALL_EXPR created from new/delete lowering and only treat calls to global replaceable allocator/deallocator functions specially if they either have this flag or are in al

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #16 from Jonathan Wakely --- I'll commit a patch to add std::construct_at today or tomorrow.

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #15 from Jonathan Wakely --- That's not valid, because operator new is not a constexpr function. You have to use a new-expression (that resolves to one of the standard operator new allocation functions), or std::allocator::allocate,

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #14 from Jakub Jelinek --- Another question is whether: constexpr int bar () { auto a = static_cast (::operator new (sizeof (int))); *a = 1; *a = *a + 2; int r = *a; ::operator delete (a); return r; } constexpr auto p = b

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #13 from Jonathan Wakely --- (In reply to Jakub Jelinek from comment #12) > Well, not fully. The paper has additions of constexpr keywords on the > library side, but more importantly, we'll probably need some hacks in the > compiler

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-14 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Jakub Jelinek changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-14 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/91369] Implement P0784R7: constexpr new

2019-10-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #10 from Jakub Jelinek --- Author: jakub Date: Sat Oct 5 07:38:21 2019 New Revision: 276622 URL: https://gcc.gnu.org/viewcvs?rev=276622&root=gcc&view=rev Log: PR c++/91369 - Implement P0784R7: constexpr new c-family/

[Bug c++/91369] Implement P0784R7: constexpr new

2019-09-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Jakub Jelinek changed: What|Removed |Added Attachment #46956|0 |1 is obsolete|

[Bug c++/91369] Implement P0784R7: constexpr new

2019-09-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Jakub Jelinek changed: What|Removed |Added Attachment #46946|0 |1 is obsolete|

[Bug c++/91369] Implement P0784R7: constexpr new

2019-09-26 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #7 from Jason Merrill --- (In reply to Jakub Jelinek from comment #6) > So, is the [class.dtor]/9 note just incorrect and should be removed, or > clarified somehow? I believe it shouldn't affect what actually is a literal > type or n

[Bug c++/91369] Implement P0784R7: constexpr new

2019-09-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #6 from Jakub Jelinek --- Still need to add further testcase coverage and finish cookie support, but I ran into something that looks like a bug in the C++ standard. [dcl.constexpr]/3 says: if the function is a constructor or destruct

[Bug c++/91369] Implement P0784R7: constexpr new

2019-09-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #5 from Jakub Jelinek --- Created attachment 46946 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46946&action=edit gcc10-pr91369.patch Current WIP patch.

[Bug c++/91369] Implement P0784R7: constexpr new

2019-09-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #4 from Jason Merrill --- (In reply to Jakub Jelinek from comment #3) > (In reply to Jason Merrill from comment #2) > > > should we mark them some way and either allow the first > > > cxx_fold_indirect_ref or the above code to change

[Bug c++/91369] Implement P0784R7: constexpr new

2019-09-10 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #3 from Jakub Jelinek --- (In reply to Jason Merrill from comment #2) > > should we mark them some way and either allow the first > > cxx_fold_indirect_ref or the above code to change their type the first time > > they are stored? >

[Bug c++/91369] Implement P0784R7: constexpr new

2019-09-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 --- Comment #2 from Jason Merrill --- (In reply to Jakub Jelinek from comment #1) > So, first of all, is it a good idea to represent the HEAP variables through > artifical VAR_DECLs? That makes sense to me. > I guess in the outermost constexpr

[Bug c++/91369] Implement P0784R7: constexpr new

2019-08-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org,

[Bug c++/91369] Implement P0784R7: constexpr new

2019-08-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|