public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98944] New: [modules] Failed to read compiled module with a non-exported partition.
@ 2021-02-02 20:38 iains at gcc dot gnu.org
  2021-02-09  6:49 ` [Bug c++/98944] " StevenSun2021 at hotmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: iains at gcc dot gnu.org @ 2021-02-02 20:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98944
           Summary: [modules] Failed to read compiled module with a
                    non-exported partition.
           Product: gcc
           Version: 11.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: ---

Example 1 from the std:

tu1:
export module A;
export import :Foo;
export int baz();

tu2:
export module A:Foo;
import :Internals;
export int foo() { return 2 * (bar() + 1); }

tu3:
module A:Internals;
int bar();

tu4:
module A;
import :Internals;
int bar() { return baz() - 10; }
int baz() { return 30; }

====

g++ -std=c++20 -fmodules-ts /source/test/module/mu-tu-3.cxx -S
g++ -std=c++20 -fmodules-ts /source/test/module/mu-tu-2.cxx -S
g++ -std=c++20 -fmodules-ts /source/test/module/mu-tu-1.cxx -S

ls gcm.cache/
A-Foo.gcm       A-Internals.gcm A.gcm

g++ -std=c++20 -fmodules-ts /source/test/module/mu-tu-4.cxx -S
A: error: failed to read compiled module: Bad file data
A: note: compiled module file is ‘gcm.cache/A.gcm’
...

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

end of thread, other threads:[~2021-02-09 16:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 20:38 [Bug c++/98944] New: [modules] Failed to read compiled module with a non-exported partition iains at gcc dot gnu.org
2021-02-09  6:49 ` [Bug c++/98944] " StevenSun2021 at hotmail dot com
2021-02-09 13:56 ` nathan at gcc dot gnu.org
2021-02-09 16:17 ` cvs-commit at gcc dot gnu.org
2021-02-09 16:17 ` nathan 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).