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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-06-27
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
[apinski@xeond2 upstream-gcc-new]$ ~/upstream-gcc-new/bin/gcc t.ii -std=c++20
-w -fmodules-ts
../modules/fast_io_core_impl.cppm:1:1: error: module-declaration only permitted
as first declaration, or ending a global module fragment
../modules/fast_io_core_impl.cppm:3:1: error: post-module-declaration imports
must be contiguous
../modules/fast_io_core_impl.cppm:3:1: note: perhaps insert a line break after
‘import’, or other disambiguation, to prevent this being considered a module
control-line
In file included from
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/type_traits:38,
                 from ../modules/fast_io_core_impl.cppm:5:
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/x86_64-pc-linux-gnu/bits/c++config.h:321:15:
error: redefinition of ‘void std::__terminate()’
In file included from
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/cstdint:38,
                 from ../modules/fast_io_core.ixx:2:
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/x86_64-pc-linux-gnu/bits/c++config.h:321:15:
note: ‘void std::__terminate()’ previously defined here
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/x86_64-pc-linux-gnu/bits/c++config.h:554:3:
error: redefinition of ‘constexpr bool std::__is_constant_evaluated()’
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/x86_64-pc-linux-gnu/bits/c++config.h:554:3:
note: ‘constexpr bool std::__is_constant_evaluated()’ previously defined here
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/x86_64-pc-linux-gnu/bits/c++config.h:616:3:
error: redefinition of ‘void std::__glibcxx_assert_fail()’
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/x86_64-pc-linux-gnu/bits/c++config.h:616:3:
note: ‘void std::__glibcxx_assert_fail()’ previously defined here
In file included from /usr/include/stdint.h:27,
                 from
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/lib/gcc/x86_64-pc-linux-gnu/15.0.0/include/stdint.h:9,
                 from
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/cstdint:45,
                 from ../modules/fast_io_core_impl.cppm:5:
/usr/include/bits/types.h:155:34: error: conflicting declaration ‘typedef
struct __fsid_t __fsid_t’
  155 | __STD_TYPE __FSID_T_TYPE __fsid_t;      /* Type of file system IDs.  */
      |                                  ^~~~~~~~~~~~~
In file included from /usr/include/stdint.h:27,
                 from
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/lib/gcc/x86_64-pc-linux-gnu/15.0.0/include/stdint.h:9,
                 from
/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/include/c++/15.0.0/cstdint:45:
/usr/include/bits/types.h:155:34: note: previous declaration as ‘typedef struct
__fsid_t __fsid_t’
  155 | __STD_TYPE __FSID_T_TYPE __fsid_t;      /* Type of file system IDs.  */
      |                                  ^~~~~~~~~~~~~
hello.cc:2:1: error: post-module-declaration imports must be contiguous
hello.cc:2:1: note: perhaps insert a line break after ‘import’, or other
disambiguation, to prevent this being considered a module control-line
hello.cc:4:5: error: cannot attach ‘::main’ to a named module


Looks like you need to provide a few more preprocessed source for the other
module.

Reply via email to