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

Nathaniel Shead <nshead at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2025-04-01 00:00:00         |2025-04-03
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Keywords|needs-reduction             |

--- Comment #13 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Confirmed.  Here's a reduction (sorry Andrew! should have commented I was doing
one overnight...):

  // a.cpp
  export module gcc_repro_a;
  static constexpr long small_object_size_ = 8;
  template <typename> void foo() { small_object_size_; }

  // b.cpp
  import gcc_repro_a;

$ g++-15 -fmodules -fno-module-lazy --param ggc-min-expand=0 --param
ggc-min-heapsize=0 -S a.cpp b.cpp
b.cpp:1:20: internal compiler error: in tree_node_structure_for_code, at
tree.cc:603
    1 | import gcc_repro_a;
      |                    ^
0x3ccec85 internal_error(char const*, ...)
        ../../gcc/gcc/diagnostic-global-context.cc:517
0x3c99890 fancy_abort(char const*, int, char const*)
        ../../gcc/gcc/diagnostic.cc:1749
0x219b538 tree_node_structure_for_code
        ../../gcc/gcc/tree.cc:603
0x21a776d tree_node_structure(tree_node const*)
        ../../gcc/gcc/tree.cc:4169
0x1360c77 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:114
0x1363094 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:475
0x1363094 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:475
0x1363094 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:475
0x136265a gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:355
0x1363cb4 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:616
0x118ea0d gt_ggc_mx_cp_binding_level(void*)
        ./gt-cp-name-lookup.h:28
0x118eabb gt_ggc_mx_cp_binding_level(void*)
        ./gt-cp-name-lookup.h:34
0x1360b27 gt_ggc_mx_lang_decl(void*)
        ./gt-cp-tree.h:87
0x13614a8 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:214
0x17c8882 ggc_mark_root_tab
        ../../gcc/gcc/ggc-common.cc:75
0x17c899d ggc_mark_roots()
        ../../gcc/gcc/ggc-common.cc:104
0x14bcb5f ggc_collect(ggc_collect)
        ../../gcc/gcc/ggc-page.cc:2258
0x114b486 module_state::read_language(bool)
        ../../gcc/gcc/cp/module.cc:20090
0x114f000 direct_import
        ../../gcc/gcc/cp/module.cc:21144
0x114f1ed import_module(module_state*, unsigned long, bool, tree_node*,
cpp_reader*)
        ../../gcc/gcc/cp/module.cc:21184
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to