public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95291] New: ICE
@ 2020-05-23 19:05 wouter at voti dot nl
2020-05-25 7:22 ` [Bug c++/95291] ICE rguenth at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: wouter at voti dot nl @ 2020-05-23 19:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Bug ID: 95291
Summary: ICE
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: wouter at voti dot nl
Target Milestone: ---
The compiler ICE's on this code. I used the 10.0.1 on windows, but the 10.1.0
on compiler explorer gives the same ICE. Options: g++ --std=c++20
https://godbolt.org/z/As6Rm7
template< typename T = int >
class xy { };
template< xy _size >
struct window_root { };
template< typename minion >
struct flip_horizontally : window_root< minion::size >{ };
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
@ 2020-05-25 7:22 ` rguenth at gcc dot gnu.org
2020-05-25 9:02 ` marxin at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-25 7:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Known to fail| |11.0
Keywords| |ice-on-valid-code
Last reconfirmed| |2020-05-25
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
t.ii:8:54: internal compiler error: Segmentation fault
8 | struct flip_horizontally : window_root< minion::size >{ };
| ^
0x167e38f crash_signal
/space/rguenther/src/gcc/gcc/toplev.c:328
0x7f77239f61df ???
/usr/src/debug/glibc-2.26-lp151.18.7.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x9e195c resolve_args(vec<tree_node*, va_gc, vl_embed>*, int)
/space/rguenther/src/gcc/gcc/cp/call.c:4482
0xce12bf do_class_deduction
/space/rguenther/src/gcc/gcc/cp/pt.c:28706
0xce1f52 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
/space/rguenther/src/gcc/gcc/cp/pt.c:28839
0xc7eb48 convert_template_argument
/space/rguenther/src/gcc/gcc/cp/pt.c:8403
0xc8080c coerce_template_parms
/space/rguenther/src/gcc/gcc/cp/pt.c:8907
0xc80fb3 coerce_innermost_template_parms
/space/rguenther/src/gcc/gcc/cp/pt.c:9053
0xc832fc lookup_template_class_1
/space/rguenther/src/gcc/gcc/cp/pt.c:9744
0xc86161 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
/space/rguenther/src/gcc/gcc/cp/pt.c:10128
0xd0d6b7 finish_template_type(tree_node*, tree_node*, int)
/space/rguenther/src/gcc/gcc/cp/semantics.c:3411
0xc078e5 cp_parser_template_id
/space/rguenther/src/gcc/gcc/cp/parser.c:16749
0xc15bba cp_parser_class_name
/space/rguenther/src/gcc/gcc/cp/parser.c:23715
0xbf2c4f cp_parser_qualifying_entity
/space/rguenther/src/gcc/gcc/cp/parser.c:6776
0xbf212d cp_parser_nested_name_specifier_opt
/space/rguenther/src/gcc/gcc/cp/parser.c:6458
0xc1a4f2 cp_parser_base_specifier
/space/rguenther/src/gcc/gcc/cp/parser.c:25721
0xc1a1a7 cp_parser_base_clause
/space/rguenther/src/gcc/gcc/cp/parser.c:25574
0xc185d4 cp_parser_class_head
/space/rguenther/src/gcc/gcc/cp/parser.c:24669
0xc16294 cp_parser_class_specifier_1
/space/rguenther/src/gcc/gcc/cp/parser.c:23838
0xc176d4 cp_parser_class_specifier
/space/rguenther/src/gcc/gcc/cp/parser.c:24212
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
2020-05-25 7:22 ` [Bug c++/95291] ICE rguenth at gcc dot gnu.org
@ 2020-05-25 9:02 ` marxin at gcc dot gnu.org
2020-05-26 20:42 ` [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482 mpolacek at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-25 9:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started when -std=c++2a was added r8-3237-g026a79f70cf33f83.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
2020-05-25 7:22 ` [Bug c++/95291] ICE rguenth at gcc dot gnu.org
2020-05-25 9:02 ` marxin at gcc dot gnu.org
@ 2020-05-26 20:42 ` mpolacek at gcc dot gnu.org
2020-08-31 22:09 ` mpolacek at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-05-26 20:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Basically a dup of bug 95159, I think.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
` (2 preceding siblings ...)
2020-05-26 20:42 ` [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482 mpolacek at gcc dot gnu.org
@ 2020-08-31 22:09 ` mpolacek at gcc dot gnu.org
2020-08-31 22:10 ` mpolacek at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-31 22:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mateusz.pusz at gmail dot com
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 96874 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
` (3 preceding siblings ...)
2020-08-31 22:09 ` mpolacek at gcc dot gnu.org
@ 2020-08-31 22:10 ` mpolacek at gcc dot gnu.org
2020-10-27 14:21 ` mpolacek at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-31 22:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
When fixing, let's make sure that bug 96874 is fixed too.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
` (4 preceding siblings ...)
2020-08-31 22:10 ` mpolacek at gcc dot gnu.org
@ 2020-10-27 14:21 ` mpolacek at gcc dot gnu.org
2021-04-21 19:18 ` ppalka at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-10-27 14:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |v.stiff at gmail dot com
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 97591 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
` (5 preceding siblings ...)
2020-10-27 14:21 ` mpolacek at gcc dot gnu.org
@ 2021-04-21 19:18 ` ppalka at gcc dot gnu.org
2021-04-24 4:15 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-04-21 19:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=93383
--- Comment #7 from Patrick Palka <ppalka at gcc dot gnu.org> ---
It looks like the pending PR93383 patch fixes these testcases as well.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
` (6 preceding siblings ...)
2021-04-21 19:18 ` ppalka at gcc dot gnu.org
@ 2021-04-24 4:15 ` cvs-commit at gcc dot gnu.org
2021-04-27 21:24 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-24 4:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:bcd77b7b9f35bd5b559ed593c3b3e346c1e6f364
commit r12-100-gbcd77b7b9f35bd5b559ed593c3b3e346c1e6f364
Author: Patrick Palka <ppalka@redhat.com>
Date: Sat Apr 24 00:14:29 2021 -0400
c++: do_class_deduction and dependent init [PR93383]
Here we're crashing during CTAD with a dependent initializer (performed
from convert_template_argument) because one of the initializer's
elements has an empty TREE_TYPE, which ends up making resolve_args
unhappy.
Besides the case where we're initializing one template placeholder
from another, which is already specifically handled earlier in
do_class_deduction, it seems we can't in general correctly resolve a
template placeholder using a dependent initializer, so this patch makes
the function just punt until instantiation time instead.
gcc/cp/ChangeLog:
PR c++/89565
PR c++/93383
PR c++/95291
PR c++/99200
PR c++/99683
* pt.c (do_class_deduction): Punt if the initializer is
type-dependent.
gcc/testsuite/ChangeLog:
PR c++/89565
PR c++/93383
PR c++/95291
PR c++/99200
PR c++/99683
* g++.dg/cpp2a/nontype-class39.C: Remove dg-ice directive.
* g++.dg/cpp2a/nontype-class45.C: New test.
* g++.dg/cpp2a/nontype-class46.C: New test.
* g++.dg/cpp2a/nontype-class47.C: New test.
* g++.dg/cpp2a/nontype-class48.C: New test.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
` (7 preceding siblings ...)
2021-04-24 4:15 ` cvs-commit at gcc dot gnu.org
@ 2021-04-27 21:24 ` cvs-commit at gcc dot gnu.org
2021-05-01 18:46 ` ppalka at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-27 21:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:9532344edcf77c7c7b0fa5da31c1b9dd2850288e
commit r11-8309-g9532344edcf77c7c7b0fa5da31c1b9dd2850288e
Author: Patrick Palka <ppalka@redhat.com>
Date: Sat Apr 24 00:14:29 2021 -0400
c++: do_class_deduction and dependent init [PR93383]
Here we're crashing during CTAD with a dependent initializer (performed
from convert_template_argument) because one of the initializer's
elements has an empty TREE_TYPE, which ends up making resolve_args
unhappy.
Besides the case where we're initializing one template placeholder
from another, which is already specifically handled earlier in
do_class_deduction, it seems we can't in general correctly resolve a
template placeholder using a dependent initializer, so this patch makes
the function just punt until instantiation time instead.
gcc/cp/ChangeLog:
PR c++/89565
PR c++/93383
PR c++/95291
PR c++/99200
PR c++/99683
* pt.c (do_class_deduction): Punt if the initializer is
type-dependent.
gcc/testsuite/ChangeLog:
PR c++/89565
PR c++/93383
PR c++/95291
PR c++/99200
PR c++/99683
* g++.dg/cpp2a/nontype-class39.C: Remove dg-ice directive.
* g++.dg/cpp2a/nontype-class45.C: New test.
* g++.dg/cpp2a/nontype-class46.C: New test.
* g++.dg/cpp2a/nontype-class47.C: New test.
* g++.dg/cpp2a/nontype-class48.C: New test.
(cherry picked from commit bcd77b7b9f35bd5b559ed593c3b3e346c1e6f364)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
` (8 preceding siblings ...)
2021-04-27 21:24 ` cvs-commit at gcc dot gnu.org
@ 2021-05-01 18:46 ` ppalka at gcc dot gnu.org
2021-05-01 18:55 ` ppalka at gcc dot gnu.org
2022-06-28 17:35 ` mpolacek at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-05-01 18:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |11.2
--- Comment #10 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 11.2 and 12.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
` (9 preceding siblings ...)
2021-05-01 18:46 ` ppalka at gcc dot gnu.org
@ 2021-05-01 18:55 ` ppalka at gcc dot gnu.org
2022-06-28 17:35 ` mpolacek at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-05-01 18:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janpmoeller at gmx dot de
--- Comment #11 from Patrick Palka <ppalka at gcc dot gnu.org> ---
*** Bug 97749 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
` (10 preceding siblings ...)
2021-05-01 18:55 ` ppalka at gcc dot gnu.org
@ 2022-06-28 17:35 ` mpolacek at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-06-28 17:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mameluc at gmail dot com
--- Comment #12 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 106125 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2022-06-28 17:35 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23 19:05 [Bug c++/95291] New: ICE wouter at voti dot nl
2020-05-25 7:22 ` [Bug c++/95291] ICE rguenth at gcc dot gnu.org
2020-05-25 9:02 ` marxin at gcc dot gnu.org
2020-05-26 20:42 ` [Bug c++/95291] ICE in resolve_args at gcc/cp/call.c:4482 mpolacek at gcc dot gnu.org
2020-08-31 22:09 ` mpolacek at gcc dot gnu.org
2020-08-31 22:10 ` mpolacek at gcc dot gnu.org
2020-10-27 14:21 ` mpolacek at gcc dot gnu.org
2021-04-21 19:18 ` ppalka at gcc dot gnu.org
2021-04-24 4:15 ` cvs-commit at gcc dot gnu.org
2021-04-27 21:24 ` cvs-commit at gcc dot gnu.org
2021-05-01 18:46 ` ppalka at gcc dot gnu.org
2021-05-01 18:55 ` ppalka at gcc dot gnu.org
2022-06-28 17:35 ` mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).