public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99425] New: [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803
@ 2021-03-06  7:49 alexander.lelyakin at googlemail dot com
  2021-03-09  8:18 ` [Bug c++/99425] " alexander.lelyakin at googlemail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-03-06  7:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99425

            Bug ID: 99425
           Summary: [modules] ICE tree check: expected tree_vec, have
                    tree_list 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 future
g++ -std=c++20 -fmodules-ts -x c++-system-header cuchar
g++ -std=c++20 -fmodules-ts -x c++-system-header system_error
g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
g++ -std=c++20 -fmodules-ts -x c++-system-header list
g++ -std=c++20 -fmodules-ts -x c++-system-header cctype
g++ -std=c++20 -fmodules-ts -x c++-system-header memory_resource
g++ -std=c++20 -fmodules-ts -x c++-system-header deque
g++ -std=c++20 -fmodules-ts -x c++-system-header cstdalign
g++ -std=c++20 -fmodules-ts -x c++-system-header cfloat
g++ -std=c++20 -fmodules-ts -x c++-system-header forward_list
g++ -std=c++20 -fmodules-ts -x c++-system-header atomic
g++ -std=c++20 -fmodules-ts -x c++-system-header chrono
g++ -std=c++20 -fmodules-ts -x c++-system-header valarray
g++ -std=c++20 -fmodules-ts -x c++-system-header iostream
g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
g++ -std=c++20 -fmodules-ts -x c++-system-header cstring
g++ -std=c++20 -fmodules-ts -x c++-system-header cstdbool
g++ -std=c++20 -fmodules-ts -x c++-system-header clocale
g++ -std=c++20 -fmodules-ts -x c++-system-header limits
g++ -std=c++20 -fmodules-ts -x c++-system-header ccomplex
g++ -std=c++20 -fmodules-ts -x c++-system-header typeindex
g++ -std=c++20 -fmodules-ts -x c++-system-header cxxabi.h
g++ -std=c++20 -fmodules-ts -x c++-system-header array
g++ -std=c++20 -fmodules-ts -x c++-system-header ios
g++ -std=c++20 -fmodules-ts -x c++-system-header cstdint
g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
g++ -std=c++20 -fmodules-ts -x c++-system-header coroutine
g++ -std=c++20 -fmodules-ts -x c++-system-header string
g++ -std=c++20 -fmodules-ts -x c++-system-header sstream
g++ -std=c++20 -fmodules-ts -x c++-system-header ratio
g++ -std=c++20 -fmodules-ts -x c++-system-header new
g++ -std=c++20 -fmodules-ts -x c++-system-header stop_token
g++ -std=c++20 -fmodules-ts -x c++-system-header cfenv
g++ -std=c++20 -fmodules-ts -x c++-system-header queue
g++ -std=c++20 -fmodules-ts -x c++-system-header condition_variable
----
In file included from /usr/local/include/c++/11.0.1/condition_variable:41:
/usr/local/include/c++/11.0.1/bits/unique_lock.h:88:63: internal compiler
error: tree check: expected tree_vec, have tree_list in
lookup_template_class_1, at cp/pt.c:9803
   88 |                     const chrono::time_point<_Clock, _Duration>&
__atime)
      |                                                               ^
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
0xac8bf4 cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:18837
0xaa798d cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:18495
0xaa8989 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:15041
0xac37ae cp_parser_parameter_declaration
        ../../gcc/gcc/cp/parser.c:23731
0xac4182 cp_parser_parameter_declaration_list
        ../../gcc/gcc/cp/parser.c:23548
0xac45d1 cp_parser_parameter_declaration_clause
        ../../gcc/gcc/cp/parser.c:23475
0xab5713 cp_parser_direct_declarator
        ../../gcc/gcc/cp/parser.c:22124
0xab5713 cp_parser_declarator
        ../../gcc/gcc/cp/parser.c:21987
0xacc958 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:21485
0xad378b cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:30493
0xad38f6 cp_parser_template_declaration_after_parameters
        ../../gcc/gcc/cp/parser.c:30065
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++/99425] [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803
  2021-03-06  7:49 [Bug c++/99425] New: [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
@ 2021-03-09  8:18 ` alexander.lelyakin at googlemail dot com
  2021-03-12  6:40 ` alexander.lelyakin at googlemail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-03-09  8:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99425

--- Comment #1 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> ---
There is a shorter sequence:

g++ -std=c++20 -fmodules-ts -x c++-system-header map
g++ -std=c++20 -fmodules-ts -x c++-system-header vector
g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
g++ -std=c++20 -fmodules-ts -x c++-system-header span
g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
g++ -std=c++20 -fmodules-ts -x c++-system-header utility
g++ -std=c++20 -fmodules-ts -x c++-system-header ctime
g++ -std=c++20 -fmodules-ts -x c++-system-header forward_list
g++ -std=c++20 -fmodules-ts -x c++-system-header deque
g++ -std=c++20 -fmodules-ts -x c++-system-header variant
g++ -std=c++20 -fmodules-ts -x c++-system-header functional
g++ -std=c++20 -fmodules-ts -x c++-system-header future
----
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:53,
                 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
                 from /usr/local/include/c++/11.0.1/condition_variable:43,
                 from /usr/local/include/c++/11.0.1/future:39:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h:58:65: internal compiler
error: tree check: expected tree_vec, have tree_list in
lookup_template_class_1, at cp/pt.c:9803
   58 |                typename _Req = _Require<is_same<_Ptr, value_type*>>>
      |                                                                 ^
0x875ba8 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9814
0x71d266 tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc/gcc/tree.h:3353
0x71d266 lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:9803
0xb21d6c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:10237
0xb49ffb finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:3498
0xabbf41 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:17444
0xabc12b cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:24671
0xab36ba cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:6994
0xab36ba cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:6676
0xac8e14 cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:18837
0xaa7bad cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:18495
0xab9973 cp_parser_type_specifier_seq
        ../../gcc/gcc/cp/parser.c:23346
0xab7ff4 cp_parser_type_id_1
        ../../gcc/gcc/cp/parser.c:23149
0xaba5d3 cp_parser_template_type_arg
        ../../gcc/gcc/cp/parser.c:23254
0xaba6ff cp_parser_template_argument
        ../../gcc/gcc/cp/parser.c:17894
0xaba6ff cp_parser_template_argument_list
        ../../gcc/gcc/cp/parser.c:17805
0xaba6ff cp_parser_enclosed_template_argument_list
        ../../gcc/gcc/cp/parser.c:30775
0xabba2c cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:17377
0xabc12b cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:24671
0xab36ba cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:6994
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 20210308 (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++/99425] [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803
  2021-03-06  7:49 [Bug c++/99425] New: [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
  2021-03-09  8:18 ` [Bug c++/99425] " alexander.lelyakin at googlemail dot com
@ 2021-03-12  6:40 ` alexander.lelyakin at googlemail dot com
  2021-03-22 15:27 ` cvs-commit at gcc dot gnu.org
  2021-03-22 15:27 ` nathan at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-03-12  6:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99425

--- Comment #2 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> ---
The same sequence now breaks earlier with different message:
g++ -std=c++20 -fmodules-ts -x c++-system-header map
g++ -std=c++20 -fmodules-ts -x c++-system-header vector
g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
g++ -std=c++20 -fmodules-ts -x c++-system-header span
g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
----
/usr/local/include/c++/11.0.1/mutex: internal compiler error: in key_mergeable,
at cp/module.cc:10366
0x6e249f trees_out::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, depset*)
        ../../gcc/gcc/cp/module.cc:10366
0xa5b3b5 trees_out::decl_value(tree_node*, depset*)
        ../../gcc/gcc/cp/module.cc:7625
0xa63251 depset::hash::find_dependencies(module_state*)
        ../../gcc/gcc/cp/module.cc:13139
0xa638e8 module_state::write(elf_out*, cpp_reader*)
        ../../gcc/gcc/cp/module.cc:17618
0xa64d7f finish_module_processing(cpp_reader*)
        ../../gcc/gcc/cp/module.cc:19858
0x9f835b c_parse_final_cleanups()
        ../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
----
g++ (GCC) 11.0.1 20210311 (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++/99425] [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803
  2021-03-06  7:49 [Bug c++/99425] New: [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
  2021-03-09  8:18 ` [Bug c++/99425] " alexander.lelyakin at googlemail dot com
  2021-03-12  6:40 ` alexander.lelyakin at googlemail dot com
@ 2021-03-22 15:27 ` cvs-commit at gcc dot gnu.org
  2021-03-22 15:27 ` nathan at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-22 15:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99425

--- Comment #3 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:87e3c2ef682e2ba7692ee56142a4eb5b6441c4d3

commit r11-7765-g87e3c2ef682e2ba7692ee56142a4eb5b6441c4d3
Author: Nathan Sidwell <nathan@acm.org>
Date:   Thu Mar 18 05:12:59 2021 -0700

    c++: duplicate alias templates with decltype [PR 99425]

    This failure was ultimately from incorrect handling of alias
    templates, but required a specific set of occurrences to happen in the
    specialization hash table.  This cleans up the specialization
    streaming to add alias instantiations at the same point as other
    instantiations.  I also removed some unneeded global variables dealing
    with mapping of duplicate decl contexts.

            PR c++/99425
            gcc/cp/
            * cp-tree.h (map_context_from, map_context_to): Delete.
            (add_mergeable_specialization): Add is_alias parm.
            * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
            * module.cc (map_context_from, map_context_to): Delete.
            (trees_in::decl_value): Add specializations later, adjust call.
            Drop useless alias lookup. Set duplicate fn parm context.
            (check_mergeable_decl): Drop context mapping.
            (trees_in::is_matching_decl): Likewise.
            (trees_in::read_function_def): Drop parameter context adjustment
            here.
            gcc/testsuite/
            * g++.dg/modules/pr99425-1.h: New.
            * g++.dg/modules/pr99425-1_a.H: New.
            * g++.dg/modules/pr99425-1_b.H: New.
            * g++.dg/modules/pr99425-1_c.C: New.
            * g++.dg/modules/pr99425-2_a.X: New.
            * g++.dg/modules/pr99425-2_b.X: New.
            * g++.dg/template/pr99425.C: New.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/99425] [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803
  2021-03-06  7:49 [Bug c++/99425] New: [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
                   ` (2 preceding siblings ...)
  2021-03-22 15:27 ` cvs-commit at gcc dot gnu.org
@ 2021-03-22 15:27 ` nathan at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-03-22 15:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99425

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
* 87e3c2ef682 2021-03-18 | c++: duplicate alias templates with decltype [PR
99425]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-22 15:27 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:49 [Bug c++/99425] New: [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803 alexander.lelyakin at googlemail dot com
2021-03-09  8:18 ` [Bug c++/99425] " alexander.lelyakin at googlemail dot com
2021-03-12  6:40 ` alexander.lelyakin at googlemail dot com
2021-03-22 15:27 ` cvs-commit at gcc dot gnu.org
2021-03-22 15:27 ` 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).