public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98760] New: [modules] ICE in add_module_decl
@ 2021-01-20  7:26 boris at kolpackov dot net
  2021-01-20  7:27 ` [Bug c++/98760] " boris at kolpackov dot net
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: boris at kolpackov dot net @ 2021-01-20  7:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98760
           Summary: [modules] ICE in add_module_decl
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: boris at kolpackov dot net
  Target Milestone: ---

The attached set of modules cause an internal compiler error:

c++ mxx{format}
c++ mxx{check}
c++ mxx{hello}
c++ cxx{hello}         
/home/boris/work/build2/tests/modules/gcc2/bugs/x/hello.cxx: In function ‘void
hello::say_hello(std::ostream&, const string_view&)’:
/home/boris/work/build2/tests/modules/gcc2/bugs/x/hello.cxx:18:10: internal
compiler error: in add_module_decl, at cp/name-lookup.c:4188
   18 |     o << format_hello (n) << std::endl;
      |          ^~~~~~~~~~~~
0xc8ff5c add_module_decl(tree_node*, tree_node*, tree_node*)
        ../../gcc/gcc/cp/name-lookup.c:4188
0xc5cc17 module_state::read_cluster(unsigned int)
        ../../gcc/gcc/cp/module.cc:14888
0xc66826 module_state::load_section(unsigned int, binding_slot*)
        ../../gcc/gcc/cp/module.cc:18036
0xc68b6c lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
        ../../gcc/gcc/cp/module.cc:18718
0xc80298 name_lookup::search_namespace_only(tree_node*)
        ../../gcc/gcc/cp/name-lookup.c:918
0xc80f82 name_lookup::search_unqualified(tree_node*, cp_binding_level*)
        ../../gcc/gcc/cp/name-lookup.c:1149
0xc9b77d lookup_name_1
        ../../gcc/gcc/cp/name-lookup.c:7910
0xc9b86d lookup_name(tree_node*, LOOK_where, LOOK_want)
        ../../gcc/gcc/cp/name-lookup.c:7930
0xb6f6d5 lookup_name(tree_node*, LOOK_want)
        ../../gcc/gcc/cp/name-lookup.h:413
0xce7da2 cp_parser_lookup_name
        ../../gcc/gcc/cp/parser.c:29285
0xcddbf9 cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:24612
0xcd1b56 cp_parser_type_name
        ../../gcc/gcc/cp/parser.c:19162
0xcd108d cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:18865
0xcb90d9 cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:7420
0xcbc6aa cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:8818
0xcbddc5 cp_parser_cast_expression
        ../../gcc/gcc/cp/parser.c:9722
0xcea805 cp_parser_simple_cast_expression
        ../../gcc/gcc/cp/parser.c:30478
0xcbe1d5 cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:9890
0xcbedc7 cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:10128
0xcbf135 cp_parser_expression
        ../../gcc/gcc/cp/parser.c:10298

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

* [Bug c++/98760] [modules] ICE in add_module_decl
  2021-01-20  7:26 [Bug c++/98760] New: [modules] ICE in add_module_decl boris at kolpackov dot net
@ 2021-01-20  7:27 ` boris at kolpackov dot net
  2021-03-04  9:20 ` boris at kolpackov dot net
  2022-04-25  7:56 ` boris at kolpackov dot net
  2 siblings, 0 replies; 4+ messages in thread
From: boris at kolpackov dot net @ 2021-01-20  7:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Boris Kolpackov <boris at kolpackov dot net> ---
Created attachment 50009
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50009&action=edit
Reproducer

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

* [Bug c++/98760] [modules] ICE in add_module_decl
  2021-01-20  7:26 [Bug c++/98760] New: [modules] ICE in add_module_decl boris at kolpackov dot net
  2021-01-20  7:27 ` [Bug c++/98760] " boris at kolpackov dot net
@ 2021-03-04  9:20 ` boris at kolpackov dot net
  2022-04-25  7:56 ` boris at kolpackov dot net
  2 siblings, 0 replies; 4+ messages in thread
From: boris at kolpackov dot net @ 2021-03-04  9:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Boris Kolpackov <boris at kolpackov dot net> ---
This still reproduces as of 11.0.1 20210304 (f3641ac70e) though the location
has changed:

hello.cxx:18:25: internal compiler error: in lookup_mark, at cp/tree.c:2403
   18 |     o << format_hello (n) << std::endl;
      |                         ^
0xde6459 lookup_mark(tree_node*, bool)
        ../../gcc/gcc/cp/tree.c:2403
0xc5fb19 name_lookup::search_adl(tree_node*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc/gcc/cp/name-lookup.c:1640
0xc5fff5 lookup_arg_dependent(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>*)
        ../../gcc/gcc/cp/name-lookup.c:1740
0xdadd38 perform_koenig_lookup(cp_expr, vec<tree_node*, va_gc, vl_embed>*, int)
        ../../gcc/gcc/cp/semantics.c:2507
0xc92a1f cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:7658
0xc954c2 cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:8818
0xc96bff cp_parser_cast_expression
        ../../gcc/gcc/cp/parser.c:9722
0xcc3a2c cp_parser_simple_cast_expression
        ../../gcc/gcc/cp/parser.c:30544
0xc9700f cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:9890
0xc97c01 cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:10128
0xc97f6f cp_parser_expression
        ../../gcc/gcc/cp/parser.c:10298
0xc9be7c cp_parser_expression_statement
        ../../gcc/gcc/cp/parser.c:12012
0xc9b76a cp_parser_statement
        ../../gcc/gcc/cp/parser.c:11808
0xc9c42e cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:12159
0xc9c2fe cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:12109
0xcb5719 cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:24029
0xcb5a4c cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:24080
0xcc228e cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:29997
0xcc20a6 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:29913
0xcb0156 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:21602

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

* [Bug c++/98760] [modules] ICE in add_module_decl
  2021-01-20  7:26 [Bug c++/98760] New: [modules] ICE in add_module_decl boris at kolpackov dot net
  2021-01-20  7:27 ` [Bug c++/98760] " boris at kolpackov dot net
  2021-03-04  9:20 ` boris at kolpackov dot net
@ 2022-04-25  7:56 ` boris at kolpackov dot net
  2 siblings, 0 replies; 4+ messages in thread
From: boris at kolpackov dot net @ 2022-04-25  7:56 UTC (permalink / raw)
  To: gcc-bugs

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

Boris Kolpackov <boris at kolpackov dot net> changed:

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

--- Comment #3 from Boris Kolpackov <boris at kolpackov dot net> ---
This appears to be fixed in GCC 12.0.1 20220421.

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

end of thread, other threads:[~2022-04-25  7:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20  7:26 [Bug c++/98760] New: [modules] ICE in add_module_decl boris at kolpackov dot net
2021-01-20  7:27 ` [Bug c++/98760] " boris at kolpackov dot net
2021-03-04  9:20 ` boris at kolpackov dot net
2022-04-25  7:56 ` boris at kolpackov dot net

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).