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

            Bug ID: 99174
           Summary: [modules] ICE with recursive inclusion of header-unit
           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: ---

self-inclusion considered dangerous

// 1_b.ii
import "./1_b.ii";



./cc1plus -quiet -std=c++20 -fmodule-header 1_b.ii                              
1_b.ii:1:1: internal compiler error: in read_preprocessor, at
cp/module.cc:17891
    1 | import "./1_b.ii";
      | ^~~~~~
0xce6da8 module_state::read_preprocessor(bool)
        ../../../src/gcc/cp/module.cc:17891
0xceb5db preprocess_module(module_state*, unsigned int, bool, bool, bool,
cpp_reader*)
        ../../../src/gcc/cp/module.cc:19446
0xc73707 module_token_filter::resume(int, int, tree_node*, unsigned int)
        ../../../src/gcc/cp/lex.c:520
0xc71c69 module_token_lang(int, int, tree_node*, unsigned int, unsigned long)
        ../../../src/gcc/cp/lex.c:557
0xd26638 cp_lexer_new_main
        ../../../src/gcc/cp/parser.c:658
0xd90362 c_parse_file()
        ../../../src/gcc/cp/parser.c:45168
0xf5194e c_common_parse_file()
        ../../../src/gcc/c-family/c-opts.c:1218

Reply via email to