* [Bug c++/106890] [10/11/12/13 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
@ 2022-09-08 10:12 ` marxin at gcc dot gnu.org
2022-09-08 10:49 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-09-08 10:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Summary|virtual inheritance |[10/11/12/13 Regression]
|triggers compiler error |virtual inheritance
|when instatiating derived |triggers compiler error
|class with in-class |when instatiating derived
|initialization |class with in-class
| |initialization since
| |r8-2709-g12659e10c7820071
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2022-09-08
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r8-2709-g12659e10c7820071.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/106890] [10/11/12/13 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
2022-09-08 10:12 ` [Bug c++/106890] [10/11/12/13 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071 marxin at gcc dot gnu.org
@ 2022-09-08 10:49 ` rguenth at gcc dot gnu.org
2022-10-19 5:55 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-08 10:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Target Milestone|--- |10.5
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/106890] [10/11/12/13 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
2022-09-08 10:12 ` [Bug c++/106890] [10/11/12/13 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071 marxin at gcc dot gnu.org
2022-09-08 10:49 ` rguenth at gcc dot gnu.org
@ 2022-10-19 5:55 ` rguenth at gcc dot gnu.org
2023-03-17 23:16 ` jason at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-19 5:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/106890] [10/11/12/13 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
` (2 preceding siblings ...)
2022-10-19 5:55 ` rguenth at gcc dot gnu.org
@ 2023-03-17 23:16 ` jason at gcc dot gnu.org
2023-03-21 15:09 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-17 23:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/106890] [10/11/12/13 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
` (3 preceding siblings ...)
2023-03-17 23:16 ` jason at gcc dot gnu.org
@ 2023-03-21 15:09 ` cvs-commit at gcc dot gnu.org
2023-04-18 20:46 ` [Bug c++/106890] [10/11/12 " cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-21 15:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:041a164ec9b467f9ac2f15980f83f17e3f8ea150
commit r13-6788-g041a164ec9b467f9ac2f15980f83f17e3f8ea150
Author: Jason Merrill <jason@redhat.com>
Date: Sat Mar 18 08:27:26 2023 -0400
c++: DMI in template with virtual base [PR106890]
When parsing a default member init we just build a CONVERT_EXPR for
converting to a virtual base, and then expand that into the more complex
form when we actually use the DMI in a constructor. But that wasn't
working
for the template case where we are considering the conversion at the point
that the constructor needs the DMI instantiation, so it seemed like we were
in a constructor already. And then when the other constructor tries to
reuse the instantiation, it sees uses of the first constructor's
parameters,
and dies. So ensure that we get the CONVERT_EXPR in this case, too.
PR c++/106890
gcc/cp/ChangeLog:
* init.cc (maybe_instantiate_nsdmi_init): Don't leave
current_function_decl set to a constructor.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/nsdmi-template25.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/106890] [10/11/12 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
` (4 preceding siblings ...)
2023-03-21 15:09 ` cvs-commit at gcc dot gnu.org
@ 2023-04-18 20:46 ` cvs-commit at gcc dot gnu.org
2023-07-07 10:43 ` [Bug c++/106890] [11 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-18 20:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:94569d91bd4c604da755b4aae84256e7fe21196a
commit r12-9441-g94569d91bd4c604da755b4aae84256e7fe21196a
Author: Jason Merrill <jason@redhat.com>
Date: Sat Mar 18 08:27:26 2023 -0400
c++: DMI in template with virtual base [PR106890]
When parsing a default member init we just build a CONVERT_EXPR for
converting to a virtual base, and then expand that into the more complex
form when we actually use the DMI in a constructor. But that wasn't
working
for the template case where we are considering the conversion at the point
that the constructor needs the DMI instantiation, so it seemed like we were
in a constructor already. And then when the other constructor tries to
reuse the instantiation, it sees uses of the first constructor's
parameters,
and dies. So ensure that we get the CONVERT_EXPR in this case, too.
PR c++/106890
gcc/cp/ChangeLog:
* init.cc (maybe_instantiate_nsdmi_init): Don't leave
current_function_decl set to a constructor.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/nsdmi-template25.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/106890] [11 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
` (5 preceding siblings ...)
2023-04-18 20:46 ` [Bug c++/106890] [10/11/12 " cvs-commit at gcc dot gnu.org
@ 2023-07-07 10:43 ` rguenth at gcc dot gnu.org
2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/106890] [11 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
` (6 preceding siblings ...)
2023-07-07 10:43 ` [Bug c++/106890] [11 " rguenth at gcc dot gnu.org
@ 2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org
2023-09-11 22:11 ` cvs-commit at gcc dot gnu.org
2023-09-11 22:11 ` jason at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-11 21:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:c4212c41daa8584c0e63862a709d03da0c7f3dee
commit r12-9811-gc4212c41daa8584c0e63862a709d03da0c7f3dee
Author: Jason Merrill <jason@redhat.com>
Date: Mon May 1 10:57:20 2023 -0400
c++: array DMI and member fn [PR109666]
Here it turns out I also needed to adjust cfun when stepping out of the
member function to instantiate the DMI. But instead of adding that tweak,
let's unify with instantiate_body and just push_to_top_level instead of
trying to do the minimum subset of it. There was no measurable change in
compile time on stdc++.h.
This should also resolve 109506 without yet another tweak.
PR c++/106890
PR c++/109666
gcc/cp/ChangeLog:
* name-lookup.cc (maybe_push_to_top_level)
(maybe_pop_from_top_level): Split out...
* pt.cc (instantiate_body): ...from here.
* init.cc (maybe_instantiate_nsdmi_init): Use them.
* name-lookup.h: Declare them..
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/nsdmi-array2.C: New test.
* g++.dg/cpp0x/nsdmi-template25.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/106890] [11 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
` (7 preceding siblings ...)
2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org
@ 2023-09-11 22:11 ` cvs-commit at gcc dot gnu.org
2023-09-11 22:11 ` jason at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-11 22:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:0d7e5f90597167c36c7816f5bcf689472e8b1940
commit r11-10982-g0d7e5f90597167c36c7816f5bcf689472e8b1940
Author: Jason Merrill <jason@redhat.com>
Date: Mon May 1 10:57:20 2023 -0400
c++: array DMI and member fn [PR109666]
Here it turns out I also needed to adjust cfun when stepping out of the
member function to instantiate the DMI. But instead of adding that tweak,
let's unify with instantiate_body and just push_to_top_level instead of
trying to do the minimum subset of it. There was no measurable change in
compile time on stdc++.h.
This should also resolve 109506 without yet another tweak.
PR c++/106890
PR c++/109666
gcc/cp/ChangeLog:
* name-lookup.c (maybe_push_to_top_level)
(maybe_pop_from_top_level): Split out...
* pt.c (instantiate_body): ...from here.
* init.c (maybe_instantiate_nsdmi_init): Use them.
* name-lookup.h: Declare them..
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/nsdmi-array2.C: New test.
* g++.dg/cpp0x/nsdmi-template25.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/106890] [11 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071
2022-09-08 10:06 [Bug c++/106890] New: virtual inheritance triggers compiler error when instatiating derived class with in-class initialization thomas at thomaslabs dot org
` (8 preceding siblings ...)
2023-09-11 22:11 ` cvs-commit at gcc dot gnu.org
@ 2023-09-11 22:11 ` jason at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2023-09-11 22:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 11.5.
^ permalink raw reply [flat|nested] 11+ messages in thread