[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2021-08-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #22 from Andrew Pinski --- Looks like the testcase in comment #12 was not resolved with the patches but is filed as PR 93413.

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2020-06-03 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org Target Milest

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-12-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #20 from Jakub Jelinek --- Author: jakub Date: Fri Dec 20 17:33:13 2019 New Revision: 279664 URL: https://gcc.gnu.org/viewcvs?rev=279664&root=gcc&view=rev Log: Backported from mainline 2019-12-03 Jakub Jelinek

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-12-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #19 from Jakub Jelinek --- Author: jakub Date: Fri Dec 20 17:32:23 2019 New Revision: 279663 URL: https://gcc.gnu.org/viewcvs?rev=279663&root=gcc&view=rev Log: Backported from mainline 2019-12-02 Jakub Jelinek

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-12-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #18 from Jakub Jelinek --- Author: jakub Date: Fri Dec 20 17:26:28 2019 New Revision: 279661 URL: https://gcc.gnu.org/viewcvs?rev=279661&root=gcc&view=rev Log: Backported from mainline 2019-11-28 Jakub Jelinek

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-12-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #17 from Jakub Jelinek --- (In reply to Toni Neubert from comment #15) > I really cannot help you with this. I am sorry. I don't understand the > compilers source code/internals at all. I just can thank you guys for your > ongoing wor

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-12-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|jakub at gcc dot

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-12-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #16 from Jakub Jelinek --- Author: jakub Date: Tue Dec 3 08:19:04 2019 New Revision: 278921 URL: https://gcc.gnu.org/viewcvs?rev=278921&root=gcc&view=rev Log: PR c++/92695 * constexpr.c (cxx_bind_parameters_in_call):

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-12-02 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #15 from Toni Neubert --- I really cannot help you with this. I am sorry. I don't understand the compilers source code/internals at all. I just can thank you guys for your ongoing work. I really appreciate it.

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-12-02 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #14 from Jakub Jelinek --- Author: jakub Date: Mon Dec 2 21:33:06 2019 New Revision: 278912 URL: https://gcc.gnu.org/viewcvs?rev=278912&root=gcc&view=rev Log: PR c++/92695 * constexpr.c (cxx_eval_constant_expression)

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-12-02 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #13 from Jakub Jelinek --- For #c12, I think that is because of: 5615 /* Defer virtual destructors so that thunks get the right 5616 linkage. */ 5617 if (DECL_VIRTUAL_P (decl) && !at_eof) 5618

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-30 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #12 from Toni Neubert --- Hello, I got another error using virtual classes: ``` struct A { virtual constexpr ~A() = default; }; struct B : A {}; constexpr bool test() { B b; return true; } static_assert(test()); ``` ->

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-30 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #11 from Toni Neubert --- I tested all patches and it works as expected. Thank you very much!

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #10 from Jakub Jelinek --- Author: jakub Date: Thu Nov 28 08:06:09 2019 New Revision: 278802 URL: https://gcc.gnu.org/viewcvs?rev=278802&root=gcc&view=rev Log: PR c++/92695 * decl2.c (mark_used): Don't call note_vague

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

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

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #8 from Jakub Jelinek --- Created attachment 47384 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47384&action=edit gcc10-pr92695-3.patch That is another bug.

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-27 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #7 from Toni Neubert --- First of all thank you very much for your extremly fast help! I testet the patch and it did work for my second example. But this one still fails, if we do not use the addressof function: struct A { v

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #6 from Jakub Jelinek --- Created attachment 47383 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47383&action=edit gcc10-pr92695.patch And here is a fix for the bogus warning. inline or constexpr on pure virtual functions loo

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 Jakub Jelinek changed: What|Removed |Added Assignee|mpolacek at gcc dot gnu.org|jakub at gcc dot gnu.org --- Comm

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #4 from Jakub Jelinek --- To be precise, I meant something like: --- gcc/cp/constexpr.c.jj 2019-11-27 10:03:37.916867165 +0100 +++ gcc/cp/constexpr.c 2019-11-27 16:55:17.475150697 +0100 @@ -1441,6 +1441,22 @@ cxx_bind_parameter

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-27 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-27 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #2 from Toni Neubert --- Copy paste error. The above example should be: ``` struct A { constexpr virtual int get() = 0; constexpr virtual int set(A *o) = 0; }; struct B : A { constexpr int get() override { retur

[Bug c++/92695] P1064R0 - virtual constexpr fails if object taken from array

2019-11-27 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92695 --- Comment #1 from Toni Neubert --- Future more, the following example also fails. Could be the same root cause but another error message appears: accessing value of 'f.Foo::b[0].B::' through a 'B' glvalue in a constant expression Clang is ju