* [Bug c++/107163] Compile time regression when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
@ 2022-10-05 19:49 ` marxin at gcc dot gnu.org
2022-10-05 19:53 ` [Bug c++/107163] [10/11/12/13 Regression] huge Compile time " pinskia at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-05 19:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-10-05
Summary|Compile time regression |Compile time regression
|when using templated base |when using templated base
|classes, virtual method, |classes, virtual method,
|and Wall |and Wall since
| |r10-2823-g6a07489267e55084
Ever confirmed|0 |1
CC| |jakub at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
With -std=c++17 likely started with r10-2823-g6a07489267e55084.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/107163] [10/11/12/13 Regression] huge Compile time when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
2022-10-05 19:49 ` [Bug c++/107163] Compile time regression when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084 marxin at gcc dot gnu.org
@ 2022-10-05 19:53 ` pinskia at gcc dot gnu.org
2022-10-05 20:39 ` [Bug c++/107163] [10/11/12/13 Regression] huge Compile time increase " redi at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-05 19:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.5
Summary|Compile time regression |[10/11/12/13 Regression]
|when using templated base |huge Compile time when
|classes, virtual method, |using templated base
|and Wall since |classes, virtual method,
|r10-2823-g6a07489267e55084 |and Wall since
| |r10-2823-g6a07489267e55084
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/107163] [10/11/12/13 Regression] huge Compile time increase when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
2022-10-05 19:49 ` [Bug c++/107163] Compile time regression when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084 marxin at gcc dot gnu.org
2022-10-05 19:53 ` [Bug c++/107163] [10/11/12/13 Regression] huge Compile time " pinskia at gcc dot gnu.org
@ 2022-10-05 20:39 ` redi at gcc dot gnu.org
2022-10-18 8:36 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-05 20:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, using -std=gnu++14 makes GCC 11 as fast as GCC 8.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/107163] [10/11/12/13 Regression] huge Compile time increase when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
` (2 preceding siblings ...)
2022-10-05 20:39 ` [Bug c++/107163] [10/11/12/13 Regression] huge Compile time increase " redi at gcc dot gnu.org
@ 2022-10-18 8:36 ` rguenth at gcc dot gnu.org
2023-03-23 19:59 ` jason at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-18 8:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163
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++/107163] [10/11/12/13 Regression] huge Compile time increase when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
` (3 preceding siblings ...)
2022-10-18 8:36 ` rguenth at gcc dot gnu.org
@ 2023-03-23 19:59 ` jason at gcc dot gnu.org
2023-03-28 15:27 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-23 19:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
This isn't specific to virtual functions; the same slowdown can be seen with
struct BaseType {
int i;
};
template< int Seq >
class DerivedType : public DerivedType< Seq - 1 > { };
template<>
class DerivedType< -1 > : public BaseType { };
int main() {
DerivedType< COUNT > d;
d.i = 42;
}
The reference to the base member is represented with a long sequence of
COMPONENT_REFs, like
d.derived<5>.derived<4>.derived<3>.derived<2>.derived<1>.derived<0>.derived<-1>.base.i
= 42
and with r10-2823 we check sequence points across each of those .s, with high
algorithmic complexity. Checking across COMPONENT_REF seems unnecessary, since
it just selects a subobject of the LHS, there's no additional evaluation.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/107163] [10/11/12/13 Regression] huge Compile time increase when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
` (4 preceding siblings ...)
2023-03-23 19:59 ` jason at gcc dot gnu.org
@ 2023-03-28 15:27 ` cvs-commit at gcc dot gnu.org
2023-04-18 20:46 ` [Bug c++/107163] [10/11/12 " cvs-commit 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-03-28 15:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163
--- Comment #4 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:0e8fc610fb7112deb8c33c673a52983368dde9b7
commit r13-6910-g0e8fc610fb7112deb8c33c673a52983368dde9b7
Author: Jason Merrill <jason@redhat.com>
Date: Thu Mar 23 15:57:39 2023 -0400
c-family: -Wsequence-point and COMPONENT_REF [PR107163]
The patch for PR91415 fixed -Wsequence-point to treat shifts and ARRAY_REF
as sequenced in C++17, and COMPONENT_REF as well. But this is unnecessary
for COMPONENT_REF, since the RHS is just a FIELD_DECL with no actual
evaluation, and in this testcase handling COMPONENT_REF as sequenced blows
up fast in a deep inheritance tree. Instead, look through it.
PR c++/107163
gcc/c-family/ChangeLog:
* c-common.cc (verify_tree): Don't use sequenced handling
for COMPONENT_REF.
gcc/testsuite/ChangeLog:
* g++.dg/warn/Wsequence-point-5.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/107163] [10/11/12 Regression] huge Compile time increase when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
` (5 preceding siblings ...)
2023-03-28 15:27 ` cvs-commit at gcc dot gnu.org
@ 2023-04-18 20:46 ` cvs-commit at gcc dot gnu.org
2023-04-21 20:28 ` [Bug c++/107163] [10/11 " cvs-commit at gcc dot gnu.org
` (2 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=107163
--- 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:dcfa9615062c46f3c45c70654ea8fa6719a5f40c
commit r12-9444-gdcfa9615062c46f3c45c70654ea8fa6719a5f40c
Author: Jason Merrill <jason@redhat.com>
Date: Thu Mar 23 15:57:39 2023 -0400
c-family: -Wsequence-point and COMPONENT_REF [PR107163]
The patch for PR91415 fixed -Wsequence-point to treat shifts and ARRAY_REF
as sequenced in C++17, and COMPONENT_REF as well. But this is unnecessary
for COMPONENT_REF, since the RHS is just a FIELD_DECL with no actual
evaluation, and in this testcase handling COMPONENT_REF as sequenced blows
up fast in a deep inheritance tree. Instead, look through it.
PR c++/107163
gcc/c-family/ChangeLog:
* c-common.cc (verify_tree): Don't use sequenced handling
for COMPONENT_REF.
gcc/testsuite/ChangeLog:
* g++.dg/warn/Wsequence-point-5.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/107163] [10/11 Regression] huge Compile time increase when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
` (6 preceding siblings ...)
2023-04-18 20:46 ` [Bug c++/107163] [10/11/12 " cvs-commit at gcc dot gnu.org
@ 2023-04-21 20:28 ` cvs-commit at gcc dot gnu.org
2023-04-22 0:23 ` cvs-commit at gcc dot gnu.org
2023-07-07 10:44 ` [Bug c++/107163] [11 " rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-21 20:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:e81e393cd864abcd2de02602bd51e435dc28f418
commit r10-11307-ge81e393cd864abcd2de02602bd51e435dc28f418
Author: Jason Merrill <jason@redhat.com>
Date: Thu Mar 23 15:57:39 2023 -0400
c-family: -Wsequence-point and COMPONENT_REF [PR107163]
The patch for PR91415 fixed -Wsequence-point to treat shifts and ARRAY_REF
as sequenced in C++17, and COMPONENT_REF as well. But this is unnecessary
for COMPONENT_REF, since the RHS is just a FIELD_DECL with no actual
evaluation, and in this testcase handling COMPONENT_REF as sequenced blows
up fast in a deep inheritance tree. Instead, look through it.
PR c++/107163
gcc/c-family/ChangeLog:
* c-common.c (verify_tree): Don't use sequenced handling
for COMPONENT_REF.
gcc/testsuite/ChangeLog:
* g++.dg/warn/Wsequence-point-5.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/107163] [10/11 Regression] huge Compile time increase when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
` (7 preceding siblings ...)
2023-04-21 20:28 ` [Bug c++/107163] [10/11 " cvs-commit at gcc dot gnu.org
@ 2023-04-22 0:23 ` cvs-commit at gcc dot gnu.org
2023-07-07 10:44 ` [Bug c++/107163] [11 " rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-22 0:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163
--- Comment #7 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:9ab083eb8a96b7f8baf6fe632d03aa496017e456
commit r11-10647-g9ab083eb8a96b7f8baf6fe632d03aa496017e456
Author: Jason Merrill <jason@redhat.com>
Date: Thu Mar 23 15:57:39 2023 -0400
c-family: -Wsequence-point and COMPONENT_REF [PR107163]
The patch for PR91415 fixed -Wsequence-point to treat shifts and ARRAY_REF
as sequenced in C++17, and COMPONENT_REF as well. But this is unnecessary
for COMPONENT_REF, since the RHS is just a FIELD_DECL with no actual
evaluation, and in this testcase handling COMPONENT_REF as sequenced blows
up fast in a deep inheritance tree. Instead, look through it.
PR c++/107163
gcc/c-family/ChangeLog:
* c-common.c (verify_tree): Don't use sequenced handling
for COMPONENT_REF.
gcc/testsuite/ChangeLog:
* g++.dg/warn/Wsequence-point-5.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/107163] [11 Regression] huge Compile time increase when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084
2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com
` (8 preceding siblings ...)
2023-04-22 0:23 ` cvs-commit at gcc dot gnu.org
@ 2023-07-07 10:44 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 11+ messages in thread