public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99040] New: [modules] partitions & using declarations
@ 2021-02-09 18:31 nathan at gcc dot gnu.org
  2021-02-10 21:05 ` [Bug c++/99040] " nathan at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-02-09 18:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99040
           Summary: [modules] partitions & using declarations
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

triaged from pr98760

// t1.ii
export  module  format;

export namespace NS
{
void Format ();
}

// t2.ii
export  module  hello:check;

export namespace NS {}

// t3.ii
export  module  hello;
export import :check;
import  format;

export namespace NS
{
using NS::Format;
}

// t4.ii
module  hello;

./cc1plus -quiet -std=c++17 -fmodules-ts -fpreprocessed t1.ii && ./cc1plus
-quiet -std=c++17 -fmodules-ts -fpreprocessed t2.ii && ./cc1plus -quiet
-std=c++17 -fmodules-ts -fpreprocessed t3.ii && ./cc1plus -quiet -std=c++17
-fmodules-ts -fpreprocessed t4.ii -fno-module-lazy
t4.ii:1:14: internal compiler error: in add_module_decl, at
cp/name-lookup.c:4199
    1 | module  hello;
      |              ^
0xd3c3ae add_module_decl(tree_node*, tree_node*, tree_node*)
        ../../../src/gcc/cp/name-lookup.c:4199
0xd0a848 module_state::read_cluster(unsigned int)
        ../../../src/gcc/cp/module.cc:14908
0xd13cf8 module_state::load_section(unsigned int, binding_slot*)
        ../../../src/gcc/cp/module.cc:18068
0xd13a26 module_state::read_language(bool)
        ../../../src/gcc/cp/module.cc:17997
0xd16625 direct_import
        ../../../src/gcc/cp/module.cc:18870
0xd16a79 declare_module(module_state*, unsigned int, bool, tree_node*,
cpp_reader*)
        ../../../src/gcc/cp/module.cc:18975
0xd72cf2 cp_parser_module_declaration
        ../../../src/gcc/cp/parser.c:13757
0xd5f315 cp_parser_translation_unit
        ../../../src/gcc/cp/parser.c:4894
0xdc21a4 c_parse_file()
        ../../../src/gcc/cp/parser.c:45179
0xfa7278 c_common_parse_file()
        ../../../src/gcc/c-family/c-opts.c:1218
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.

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

end of thread, other threads:[~2021-02-12 21:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 18:31 [Bug c++/99040] New: [modules] partitions & using declarations nathan at gcc dot gnu.org
2021-02-10 21:05 ` [Bug c++/99040] " nathan at gcc dot gnu.org
2021-02-12 21:50 ` cvs-commit at gcc dot gnu.org
2021-02-12 21:50 ` cvs-commit at gcc dot gnu.org
2021-02-12 21:51 ` 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).