public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106363] New: [modules] Can't selectively reexport imported declaration in same namespace
@ 2022-07-20  2:07 johelegp at gmail dot com
  2022-10-24 19:53 ` [Bug c++/106363] [13 Regression] " johelegp at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: johelegp at gmail dot com @ 2022-07-20  2:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106363
           Summary: [modules] Can't selectively reexport imported
                    declaration in same namespace
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: johelegp at gmail dot com
                CC: johelegp at gmail dot com
  Target Milestone: ---

See https://godbolt.org/z/a3GqTEs5P, which Clang accepts:
https://godbolt.org/z/svaGvz1bz.

mod2.cpp:
```C++
export module mod2;
namespace ns {
export int x = 0;
}
```

mod.cpp:
```C++
export module mod;
import mod2;
namespace ns {
export using ns::x;
}
```

test.cpp:
```C++
import mod;
int main() { return ns::x; }
```

Output:
```
[ 62%] Building CXX object CMakeFiles/mod.dir/mod.cpp.o
mod.cpp:1:8: internal compiler error: in decl_node, at cp/module.cc:8678
    1 | export module mod;
      |        ^~~~~~
0x221f229 internal_error(char const*, ...)
        ???:0
0x74c10d fancy_abort(char const*, int, char const*)
        ???:0
0x8fcc60 trees_out::decl_node(tree_node*, walk_kind)
        ???:0
0x8fd01d trees_out::tree_node(tree_node*)
        ???:0
0x905086 module_state::write_cluster(elf_out*, depset**, unsigned int,
depset::hash&, unsigned int*, unsigned int*)
        ???:0
0x906ace module_state::write_begin(elf_out*, cpp_reader*, module_state_config&,
unsigned int&)
        ???:0
0x9079f2 finish_module_processing(cpp_reader*)
        ???:0
0x87253d c_parse_final_cleanups()
        ???:0
0xb2d060 c_common_parse_file()
        ???:0
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.
```

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

end of thread, other threads:[~2024-03-13 17:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20  2:07 [Bug c++/106363] New: [modules] Can't selectively reexport imported declaration in same namespace johelegp at gmail dot com
2022-10-24 19:53 ` [Bug c++/106363] [13 Regression] " johelegp at gmail dot com
2022-10-24 20:07 ` [Bug c++/106363] [13 Regression] [modules] ICE using-declaration of imported name in the " johelegp at gmail dot com
2022-11-29 16:48 ` pinskia at gcc dot gnu.org
2022-12-22 14:57 ` rguenth at gcc dot gnu.org
2023-04-26  6:56 ` [Bug c++/106363] [13/14 " rguenth at gcc dot gnu.org
2023-07-27  9:23 ` rguenth at gcc dot gnu.org
2023-12-16 23:39 ` cvs-commit at gcc dot gnu.org
2024-03-10  3:28 ` [Bug c++/106363] [13 " law at gcc dot gnu.org
2024-03-13 17:48 ` ppalka 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).