public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "boris at kolpackov dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/98760] New: [modules] ICE in add_module_decl
Date: Wed, 20 Jan 2021 07:26:03 +0000	[thread overview]
Message-ID: <bug-98760-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             reply	other threads:[~2021-01-20  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20  7:26 boris at kolpackov dot net [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-98760-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).