* [Bug c++/98333] [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c
2020-12-16 18:40 [Bug c++/98333] New: [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 gscfq@t-online.de
@ 2020-12-17 11:20 ` marxin at gcc dot gnu.org
2020-12-17 15:00 ` mpolacek at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-17 11:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98333
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-12-17
Status|UNCONFIRMED |NEW
Summary|[10/11 Regression] ICE in |[10/11 Regression] ICE in
|check_qualified_type, at |check_qualified_type, at
|tree.c:6593 |tree.c:6593 since
| |r10-1280-g78f7607db4c53f8c
Ever confirmed|0 |1
CC| |marxin at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-1280-g78f7607db4c53f8c.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/98333] [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c
2020-12-16 18:40 [Bug c++/98333] New: [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 gscfq@t-online.de
2020-12-17 11:20 ` [Bug c++/98333] [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c marxin at gcc dot gnu.org
@ 2020-12-17 15:00 ` mpolacek at gcc dot gnu.org
2021-01-04 15:34 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-12-17 15:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98333
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
Target Milestone|--- |10.3
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/98333] [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c
2020-12-16 18:40 [Bug c++/98333] New: [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 gscfq@t-online.de
2020-12-17 11:20 ` [Bug c++/98333] [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c marxin at gcc dot gnu.org
2020-12-17 15:00 ` mpolacek at gcc dot gnu.org
@ 2021-01-04 15:34 ` rguenth at gcc dot gnu.org
2021-01-07 23:24 ` mpolacek at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-04 15:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98333
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/98333] [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c
2020-12-16 18:40 [Bug c++/98333] New: [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 gscfq@t-online.de
` (2 preceding siblings ...)
2021-01-04 15:34 ` rguenth at gcc dot gnu.org
@ 2021-01-07 23:24 ` mpolacek at gcc dot gnu.org
2021-01-19 20:40 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-07 23:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98333
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |ice-on-valid-code
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Modified valid code:
constexpr int b = false;
struct T {
template <class> struct S
{ S () noexcept (b) {} };
int a = __has_nothrow_constructor (S<int>);
};
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/98333] [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c
2020-12-16 18:40 [Bug c++/98333] New: [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 gscfq@t-online.de
` (3 preceding siblings ...)
2021-01-07 23:24 ` mpolacek at gcc dot gnu.org
@ 2021-01-19 20:40 ` cvs-commit at gcc dot gnu.org
2021-01-19 20:42 ` [Bug c++/98333] [10 " mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-19 20:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98333
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:c37f1d4081f5a19e39192d13e2a3acea13662e5a
commit r11-6799-gc37f1d4081f5a19e39192d13e2a3acea13662e5a
Author: Marek Polacek <polacek@redhat.com>
Date: Fri Jan 8 15:48:41 2021 -0500
c++: ICE when late parsing noexcept/NSDMI [PR98333]
Since certain members of a class are a complete-class context
[class.mem.general]p7, we delay their parsing untile the whole class has
been parsed. For instance, NSDMIs and noexcept-specifiers. The order
in which we perform this delayed parsing matters; we were first parsing
NSDMIs and only they did we parse noexcept-specifiers. That turns out
to be wrong: since NSDMIs may use noexcept-specifiers, we must process
noexcept-specifiers first. Otherwise we'll ICE in code that doesn't
expect to see DEFERRED_PARSE.
This doesn't just shift the problem, noexcept-specifiers can use members
with a NSDMI just fine, and I've also tested a similar test with this
member function:
bool f() { return __has_nothrow_constructor (S<true>); }
and that compiled fine too.
gcc/cp/ChangeLog:
PR c++/98333
* parser.c (cp_parser_class_specifier_1): Perform late-parsing
of NSDMIs before late-parsing of noexcept-specifiers.
gcc/testsuite/ChangeLog:
PR c++/98333
* g++.dg/cpp0x/noexcept62.C: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/98333] [10 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c
2020-12-16 18:40 [Bug c++/98333] New: [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 gscfq@t-online.de
` (4 preceding siblings ...)
2021-01-19 20:40 ` cvs-commit at gcc dot gnu.org
@ 2021-01-19 20:42 ` mpolacek at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-19 20:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98333
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11 Regression] ICE in |[10 Regression] ICE in
|check_qualified_type, at |check_qualified_type, at
|tree.c:6593 since |tree.c:6593 since
|r10-1280-g78f7607db4c53f8c |r10-1280-g78f7607db4c53f8c
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed on trunk so far.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/98333] [10 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c
2020-12-16 18:40 [Bug c++/98333] New: [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 gscfq@t-online.de
` (5 preceding siblings ...)
2021-01-19 20:42 ` [Bug c++/98333] [10 " mpolacek at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-09 22:25 ` cvs-commit at gcc dot gnu.org
2021-04-09 22:27 ` mpolacek at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98333
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.3 |10.4
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/98333] [10 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c
2020-12-16 18:40 [Bug c++/98333] New: [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 gscfq@t-online.de
` (6 preceding siblings ...)
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2021-04-09 22:25 ` cvs-commit at gcc dot gnu.org
2021-04-09 22:27 ` mpolacek at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-09 22:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98333
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Marek Polacek
<mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:3bb551c6751304fb2d51cc8569f066dd8a9090e2
commit r10-9682-g3bb551c6751304fb2d51cc8569f066dd8a9090e2
Author: Marek Polacek <polacek@redhat.com>
Date: Fri Jan 8 15:48:41 2021 -0500
c++: ICE when late parsing noexcept/NSDMI [PR98333]
Since certain members of a class are a complete-class context
[class.mem.general]p7, we delay their parsing untile the whole class has
been parsed. For instance, NSDMIs and noexcept-specifiers. The order
in which we perform this delayed parsing matters; we were first parsing
NSDMIs and only they did we parse noexcept-specifiers. That turns out
to be wrong: since NSDMIs may use noexcept-specifiers, we must process
noexcept-specifiers first. Otherwise we'll ICE in code that doesn't
expect to see DEFERRED_PARSE.
This doesn't just shift the problem, noexcept-specifiers can use members
with a NSDMI just fine, and I've also tested a similar test with this
member function:
bool f() { return __has_nothrow_constructor (S<true>); }
and that compiled fine too.
gcc/cp/ChangeLog:
PR c++/98333
* parser.c (cp_parser_class_specifier_1): Perform late-parsing
of NSDMIs before late-parsing of noexcept-specifiers.
gcc/testsuite/ChangeLog:
PR c++/98333
* g++.dg/cpp0x/noexcept62.C: New test.
(cherry picked from commit c37f1d4081f5a19e39192d13e2a3acea13662e5a)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/98333] [10 Regression] ICE in check_qualified_type, at tree.c:6593 since r10-1280-g78f7607db4c53f8c
2020-12-16 18:40 [Bug c++/98333] New: [10/11 Regression] ICE in check_qualified_type, at tree.c:6593 gscfq@t-online.de
` (7 preceding siblings ...)
2021-04-09 22:25 ` cvs-commit at gcc dot gnu.org
@ 2021-04-09 22:27 ` mpolacek at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-04-09 22:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98333
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed for GCC 10.4/11.
^ permalink raw reply [flat|nested] 10+ messages in thread