public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114685] New: [modules] ICE when exporting a type through a different alias then one declared in GMF
@ 2024-04-10 20:51 m.cencora at gmail dot com
  2024-04-10 21:11 ` [Bug c++/114685] " m.cencora at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: m.cencora at gmail dot com @ 2024-04-10 20:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114685
           Summary: [modules] ICE when exporting a type through a
                    different alias then one declared in GMF
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: m.cencora at gmail dot com
  Target Milestone: ---

$ cat lldiv_t.cpp 
module;

#include "lldiv_t.h"

export module std;

export namespace std
{
using ::__gnu_cxx::lldiv_t;
}

$ cat lldiv_t.h 
#pragma once

struct lldiv_t{};

namespace __gnu_cxx
{
using ::lldiv_t;
}

namespace std
{
using ::lldiv_t;
}

$ g++ -std=gnu++2b -isystem $PWD -fmodules-ts lldiv_t.cpp
lldiv_t.cpp:5:8: internal compiler error: in add_binding_entity, at
cp/module.cc:12992
    5 | export module std;
      |        ^~~~~~
0x772540 depset::hash::add_binding_entity(tree_node*, WMB_Flags, void*)
        ../../src/gcc/cp/module.cc:12992
0x1049b77 walk_module_binding(tree_node*, bitmap_head*, bool (*)(tree_node*,
WMB_Flags, void*), void*)
        ../../src/gcc/cp/name-lookup.cc:4224
0x1017341 depset::hash::add_namespace_entities(tree_node*, bitmap_head*)
        ../../src/gcc/cp/module.cc:13032
0x1031c89 module_state::write_begin(elf_out*, cpp_reader*,
module_state_config&, unsigned int&)
        ../../src/gcc/cp/module.cc:17968
0x1033244 finish_module_processing(cpp_reader*)
        ../../src/gcc/cp/module.cc:20340
0xfbcbc1 c_parse_final_cleanups()
        ../../src/gcc/cp/decl2.cc:5354
0x120ef68 c_common_parse_file()
        ../../src/gcc/c-family/c-opts.cc:1329

Works fine on gcc-13.
Reduced from an implementation of "std" module.

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

end of thread, other threads:[~2024-04-26 20:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10 20:51 [Bug c++/114685] New: [modules] ICE when exporting a type through a different alias then one declared in GMF m.cencora at gmail dot com
2024-04-10 21:11 ` [Bug c++/114685] " m.cencora at gmail dot com
2024-04-11 13:49 ` nshead at gcc dot gnu.org
2024-04-24 13:53 ` ppalka at gcc dot gnu.org
2024-04-26 20:55 ` m.cencora at gmail dot com

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