public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99423] New: [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
@ 2021-03-06 7:47 alexander.lelyakin at googlemail dot com
2021-03-09 14:23 ` [Bug c++/99423] " nathan at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-03-06 7:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423
Bug ID: 99423
Summary: [modules] ICE tree check: expected tree_vec, have
ggc_freed in lookup_template_class_1, at cp/pt.c:9803
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: alexander.lelyakin at googlemail dot com
Target Milestone: ---
g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_map
g++ -std=c++20 -fmodules-ts -x c++-system-header functional
----
In file included from /usr/local/include/c++/11.0.1/bits/stl_algo.h:60,
from /usr/local/include/c++/11.0.1/vector:62,
from /usr/local/include/c++/11.0.1/functional:62:
/usr/local/include/c++/11.0.1/bits/algorithmfwd.h:259:24: internal compiler
error: tree check: expected tree_vec, have ggc_freed in
lookup_template_class_1, at cp/pt.c:9803
259 | pair<_FIter, _FIter>
| ^
0x875966 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9814
0x71d27b tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/gcc/tree.h:3353
0x71d27b lookup_template_class_1
../../gcc/gcc/cp/pt.c:9803
0xb21d1c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc/gcc/cp/pt.c:10237
0xb49afb finish_template_type(tree_node*, tree_node*, int)
../../gcc/gcc/cp/semantics.c:3498
0xabbd21 cp_parser_template_id
../../gcc/gcc/cp/parser.c:17444
0xabbf0b cp_parser_class_name
../../gcc/gcc/cp/parser.c:24671
0xab349a cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:6994
0xab349a cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:6676
0xaa8db9 cp_parser_constructor_declarator_p
../../gcc/gcc/cp/parser.c:29643
0xaa8db9 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:15026
0xad3576 cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:30402
0xad38f6 cp_parser_template_declaration_after_parameters
../../gcc/gcc/cp/parser.c:30065
0xad40a0 cp_parser_explicit_template_declaration
../../gcc/gcc/cp/parser.c:30331
0xad67c9 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14047
0xad5d99 cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14145
0xad5d99 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:13933
0xad6232 cp_parser_namespace_body
../../gcc/gcc/cp/parser.c:20433
0xad6232 cp_parser_namespace_definition
../../gcc/gcc/cp/parser.c:20411
0xad6988 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14096
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.
----
g++ (GCC) 11.0.1 20210305 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
2021-03-06 7:47 [Bug c++/99423] New: [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
@ 2021-03-09 14:23 ` nathan at gcc dot gnu.org
2021-03-10 17:39 ` nathan at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-03-09 14:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-03-09
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
2021-03-06 7:47 [Bug c++/99423] New: [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
2021-03-09 14:23 ` [Bug c++/99423] " nathan at gcc dot gnu.org
@ 2021-03-10 17:39 ` nathan at gcc dot gnu.org
2021-03-10 20:12 ` cvs-commit at gcc dot gnu.org
2021-03-10 20:12 ` nathan at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-03-10 17:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423
--- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
// bug_a.ii
template<typename _T1>
struct pair
{
pair() { }
};
inline pair<bool> blob ()
{
return {};
}
// bug_b.ii
import "bug_a.ii";
pair<bool> boom();
./cc1plus -fmodule-header=system -std=c++20 bug_a.ii -fpreprocessed -quiet &&
./cc1plus -fmodule-header=system -std=c++20 bug_b.ii -fpreprocessed -quiet
--param ggc-min-expand=0 --param ggc-min-heapsize=0
bug_b.ii:4:10: internal compiler error: tree check: expected tree_vec, have
ggc_freed in lookup_template_class_1, at cp/pt.c:9803
4 | pair<bool> boom();
| ^
0x1acdc4b tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../../src/gcc/tree.c:9814
0xad685c tree_check(tree_node*, char const*, int, char const*, tree_code)
../../../src/gcc/tree.h:3353
0xdc6b60 lookup_template_class_1
../../../src/gcc/cp/pt.c:9803
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
2021-03-06 7:47 [Bug c++/99423] New: [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
2021-03-09 14:23 ` [Bug c++/99423] " nathan at gcc dot gnu.org
2021-03-10 17:39 ` nathan at gcc dot gnu.org
@ 2021-03-10 20:12 ` cvs-commit at gcc dot gnu.org
2021-03-10 20:12 ` nathan at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-10 20:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>:
https://gcc.gnu.org/g:1f428775acc391c8ce4fcf79b243043f3333cc99
commit r11-7610-g1f428775acc391c8ce4fcf79b243043f3333cc99
Author: Nathan Sidwell <nathan@acm.org>
Date: Wed Mar 10 12:07:24 2021 -0800
c++: ICE do to GC leakage [PR 99423]
My reworking of pending-entity loading introduced a GC problem. The
post-load processing needs to inhibit GCs (that would otherwise occur
in clone_decl). That wasn't happening on one code path, leading to
dangling pointers in the active call frames.
PR c++/99423
gcc/cp/
* module.cc (post_load_processing): Assert not gcable.
(laxy_load_pendings): Extend no-gc region around
post_load_processing.
gcc/testsuite/
* g++.dg/modules/pr99423_a.H: New.
* g++.dg/modules/pr99423_b.H: New.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
2021-03-06 7:47 [Bug c++/99423] New: [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
` (2 preceding siblings ...)
2021-03-10 20:12 ` cvs-commit at gcc dot gnu.org
@ 2021-03-10 20:12 ` nathan at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-03-10 20:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
1f428775acc 2021-03-10 | c++: ICE do to GC leakage [PR 99423]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-10 20:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-06 7:47 [Bug c++/99423] New: [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
2021-03-09 14:23 ` [Bug c++/99423] " nathan at gcc dot gnu.org
2021-03-10 17:39 ` nathan at gcc dot gnu.org
2021-03-10 20:12 ` cvs-commit at gcc dot gnu.org
2021-03-10 20:12 ` nathan 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).