public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110447] New: [modules] unexpected attachment of GMF decls to a named module. Date: Wed, 28 Jun 2023 08:46:20 +0000 [thread overview] Message-ID: <bug-110447-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110447 Bug ID: 110447 Summary: [modules] unexpected attachment of GMF decls to a named module. Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: iains at gcc dot gnu.org Target Milestone: --- While trying to compare behaviour of GCC and clang .... ==== Foo.cpp: module; #include <iostream> export module Foo; export void my_hello (const char *str) { std::cout << str << std::endl; } ==== pr61465.cpp: import Foo; // assume module 'foo' contain the declarations from `<iostream>` #include <iostream> int main(int argc, char *argv[]) { std::cout << "Test\n"; my_hello ("and we used Foo"); return 0; } ==== g++ -std=c++20 -fmodules-ts Foo.cpp -c g++ -std=c++20 -fmodules-ts pr6145-main.cpp Foo.o -o t -flang-info-module-cmi ... In module imported at pr6145-main.cpp:1:1: Foo: note: reading CMI ‘gcm.cache/Foo.gcm’ <snip include stack traceback> /usr/include/runetype.h:111:20: error: conflicting declaration ‘_RuneLocale _DefaultRuneLocale’ <snip include stack traceback> /usr/include/runetype.h:111:20: note: previous declaration as ‘_RuneLocale@Foo _DefaultRuneLocale@Foo’ ==== NOTE: iostream is _not_ built as a header unit in this case (if we do that the problem disappears). ---- What seems wrong here is that the _RuneLocale symbol appears to be attached to Foo - but ir should be part of the GMF of Foo and not visible to importers (although potentially reachable if used in the module purview of Foo). unless i miss something?
next reply other threads:[~2023-06-28 8:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-28 8:46 iains at gcc dot gnu.org [this message] 2023-06-28 8:48 ` [Bug c++/110447] " iains at gcc dot gnu.org 2024-03-13 17:53 ` ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-110447-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).