public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105476] New: internal compiler error: in build_deduction_guide
@ 2022-05-04 10:32 ispavlick at gmail dot com
2022-05-04 10:44 ` [Bug c++/105476] " marxin at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: ispavlick at gmail dot com @ 2022-05-04 10:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
Bug ID: 105476
Summary: internal compiler error: in build_deduction_guide
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ispavlick at gmail dot com
Target Milestone: ---
Reference to a preprocessed file (size limits do not allow uploading here)
https://drive.google.com/file/d/1y8_Ctd0-VxdZHHhgHen2s7b2DjGpyCC8/view?usp=sharing
$ gcc -std=gnu++20 -x c++-cpp-output 3.ii -o res
/home/pavlick/wrk/sftable/temp/3.cpp: In function ‘int main()’:
/home/pavlick/wrk/sftable/temp/3.cpp:18:9: internal compiler error: in
build_deduction_guide, at cp/pt.c:28659
18 | };
| ^
0xe4c988 internal_error(char const*, ...)
???:0
0xe42d02 fancy_abort(char const*, int, char const*)
???:0
0x10358fb cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
???:0
0x14e7873 c_parse_file()
???:0
0x14c9d9e c_common_parse_file()
???:0
Please submit a full bug report,
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] internal compiler error: in build_deduction_guide
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
@ 2022-05-04 10:44 ` marxin at gcc dot gnu.org
2022-05-04 11:08 ` ispavlick at gmail dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-04 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2022-05-04
Keywords| |needs-reduction
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Reducing that right now...
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] internal compiler error: in build_deduction_guide
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
2022-05-04 10:44 ` [Bug c++/105476] " marxin at gcc dot gnu.org
@ 2022-05-04 11:08 ` ispavlick at gmail dot com
2022-05-04 11:09 ` marxin at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ispavlick at gmail dot com @ 2022-05-04 11:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
--- Comment #2 from pavlick <ispavlick at gmail dot com> ---
One moment, i will do reduction.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] internal compiler error: in build_deduction_guide
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
2022-05-04 10:44 ` [Bug c++/105476] " marxin at gcc dot gnu.org
2022-05-04 11:08 ` ispavlick at gmail dot com
@ 2022-05-04 11:09 ` marxin at gcc dot gnu.org
2022-05-04 11:12 ` marxin at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-04 11:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to pavlick from comment #2)
> One moment, i will do reduction.
I'm almost done.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] internal compiler error: in build_deduction_guide
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
` (2 preceding siblings ...)
2022-05-04 11:09 ` marxin at gcc dot gnu.org
@ 2022-05-04 11:12 ` marxin at gcc dot gnu.org
2022-05-04 12:07 ` [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328 marxin at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-04 11:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-reduction |
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
$ cat pr105476.ii
template <typename> struct Visitor_functor;
template <typename, int> struct Events {
template <typename... Fn> struct Visitor : Visitor_functor<Fn>::type_t... {};
};
using ev_t = Events<wchar_t, 4>;
ev_t::Visitor v {
{}
};
$ g++ pr105476.ii -c -std=gnu++20
pr105476.ii:8:1: internal compiler error: in build_deduction_guide, at
cp/pt.cc:29278
8 | };
| ^
0x75c539 build_deduction_guide
/home/marxin/Programming/gcc/gcc/cp/pt.cc:29278
0xbc1035 do_class_deduction
/home/marxin/Programming/gcc/gcc/cp/pt.cc:30049
0xbc1035 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
/home/marxin/Programming/gcc/gcc/cp/pt.cc:30180
0xa9cc9b cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
/home/marxin/Programming/gcc/gcc/cp/decl.cc:8119
0xb95ab7 cp_parser_init_declarator
/home/marxin/Programming/gcc/gcc/cp/parser.cc:22837
0xb6ee96 cp_parser_simple_declaration
/home/marxin/Programming/gcc/gcc/cp/parser.cc:15280
0xba1050 cp_parser_declaration
/home/marxin/Programming/gcc/gcc/cp/parser.cc:14966
0xba1b6b cp_parser_toplevel_declaration
/home/marxin/Programming/gcc/gcc/cp/parser.cc:14987
0xba1b6b cp_parser_translation_unit
/home/marxin/Programming/gcc/gcc/cp/parser.cc:5010
0xba1b6b c_parse_file()
/home/marxin/Programming/gcc/gcc/cp/parser.cc:48113
0xce5d69 c_common_parse_file()
/home/marxin/Programming/gcc/gcc/c-family/c-opts.cc:1240
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
` (3 preceding siblings ...)
2022-05-04 11:12 ` marxin at gcc dot gnu.org
@ 2022-05-04 12:07 ` marxin at gcc dot gnu.org
2022-05-04 12:46 ` ppalka at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-04 12:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Summary|internal compiler error: in |ICE in
|build_deduction_guide |build_deduction_guide since
| |r10-4719-g9b41ebbcdf9e3328
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-4719-g9b41ebbcdf9e3328, it was rejected before the revision.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
` (4 preceding siblings ...)
2022-05-04 12:07 ` [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328 marxin at gcc dot gnu.org
@ 2022-05-04 12:46 ` ppalka at gcc dot gnu.org
2022-05-04 16:29 ` ppalka at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-05-04 12:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Status|NEW |ASSIGNED
CC| |ppalka at gcc dot gnu.org
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
` (5 preceding siblings ...)
2022-05-04 12:46 ` ppalka at gcc dot gnu.org
@ 2022-05-04 16:29 ` ppalka at gcc dot gnu.org
2022-05-04 21:09 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-05-04 16:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
ICE-on-valid version:
template<class> struct Visitor_functor;
template<> struct Visitor_functor<int> {
using type_t = int;
};
template<class T> struct Events {
template<class Fn=T> struct Visitor {
Visitor_functor<Fn>::type_t t;
};
};
using ev_t = Events<int>;
ev_t::Visitor v = { {} };
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
` (6 preceding siblings ...)
2022-05-04 16:29 ` ppalka at gcc dot gnu.org
@ 2022-05-04 21:09 ` cvs-commit at gcc dot gnu.org
2022-05-04 21:11 ` ppalka at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-04 21:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
--- Comment #7 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:8a98e3ff7e80bf2936f163d50309fd88d72564a0
commit r13-123-g8a98e3ff7e80bf2936f163d50309fd88d72564a0
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed May 4 17:08:08 2022 -0400
c++: ICE during aggr CTAD for member tmpl [PR105476]
Here we're crashing from maybe_aggr_guide ultimately because
processing_template_decl isn't set when partially instantiating the
guide's parameter list; this causes us to force completion of the
dependent type Visitor_functior<Fn>, which of course fails and results
in an unexpected error_mark_node (the instantation should always succeed).
PR c++/105476
gcc/cp/ChangeLog:
* pt.cc (maybe_aggr_guide): Set processing_template_decl when
partially instantiating the guide's parameter list.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/class-deduction-aggr13.C: New test.
* g++.dg/cpp2a/class-deduction-aggr13a.C: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
` (7 preceding siblings ...)
2022-05-04 21:09 ` cvs-commit at gcc dot gnu.org
@ 2022-05-04 21:11 ` ppalka at gcc dot gnu.org
2022-05-06 13:13 ` cvs-commit at gcc dot gnu.org
2022-05-06 13:16 ` ppalka at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-05-04 21:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.2
--- Comment #8 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 13 so far, will also backport for 12.2.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
` (8 preceding siblings ...)
2022-05-04 21:11 ` ppalka at gcc dot gnu.org
@ 2022-05-06 13:13 ` cvs-commit at gcc dot gnu.org
2022-05-06 13:16 ` ppalka at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-06 13:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:8f2b7c13567250d86367c0274859f6c2fe162082
commit r12-8350-g8f2b7c13567250d86367c0274859f6c2fe162082
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed May 4 17:08:08 2022 -0400
c++: ICE during aggr CTAD for member tmpl [PR105476]
Here we're crashing from maybe_aggr_guide ultimately because
processing_template_decl isn't set when partially instantiating the
guide's parameter list; this causes us to force completion of the
dependent type Visitor_functior<Fn>, which of course fails and results
in an unexpected error_mark_node (the instantation should always succeed).
PR c++/105476
gcc/cp/ChangeLog:
* pt.cc (maybe_aggr_guide): Set processing_template_decl when
partially instantiating the guide's parameter list.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/class-deduction-aggr13.C: New test.
* g++.dg/cpp2a/class-deduction-aggr13a.C: New test.
(cherry picked from commit 8a98e3ff7e80bf2936f163d50309fd88d72564a0)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
` (9 preceding siblings ...)
2022-05-06 13:13 ` cvs-commit at gcc dot gnu.org
@ 2022-05-06 13:16 ` ppalka at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-05-06 13:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105476
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #10 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 12.2/13, thanks for the bug report.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-05-06 13:16 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 10:32 [Bug c++/105476] New: internal compiler error: in build_deduction_guide ispavlick at gmail dot com
2022-05-04 10:44 ` [Bug c++/105476] " marxin at gcc dot gnu.org
2022-05-04 11:08 ` ispavlick at gmail dot com
2022-05-04 11:09 ` marxin at gcc dot gnu.org
2022-05-04 11:12 ` marxin at gcc dot gnu.org
2022-05-04 12:07 ` [Bug c++/105476] ICE in build_deduction_guide since r10-4719-g9b41ebbcdf9e3328 marxin at gcc dot gnu.org
2022-05-04 12:46 ` ppalka at gcc dot gnu.org
2022-05-04 16:29 ` ppalka at gcc dot gnu.org
2022-05-04 21:09 ` cvs-commit at gcc dot gnu.org
2022-05-04 21:11 ` ppalka at gcc dot gnu.org
2022-05-06 13:13 ` cvs-commit at gcc dot gnu.org
2022-05-06 13:16 ` ppalka 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).