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

            Bug ID: 122253
           Summary: TU-local entity error references "struct
                    integer_sequence"
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dvd at gnx dot it
  Target Milestone: ---

Trying to compile this small snippet (using gcc 15.2.0)

```
// mod.cppm
module;
#include <simd>
export module m;
std::datapar::simd<char> k;
```

with the commandline: g++ -std=c++23 -fmodules -Wall -Wextra -Og -I ./simd -c
./mod.cppm

results in a bunch of "exposes TU-local entity" errors. The simd library is
https://github.com/GSI-HPC/simd/

Some errors are due to some static inline variables, so far so good... but
there are these errors referencing types defined in the stdlib:

```
./simd/bits/simd_config.h:351:3: error: 'template<int _Np, class _Tag,
std::__detail::_BuildFlags <anonymous> > template<class _Tp, class
_BinaryOperation, class _A0, class _A1, class ... _Abis> template<int ..._Is>
std::__detail::_SimdImplAbiCombine<_Np, _Tag, <anonymous> >::_S_reduce(const
_BinaryOperation&, const std::datapar::basic_simd<_Tp, _A0>&, const
std::datapar::basic_simd<_Tp, _A1>&, const std::datapar::basic_simd<_Tp,
_Abis>& ...)::<lambda(std::integer_sequence<int, _Is ...>)>' exposes TU-local
entity 'using std::make_integer_sequence = struct std::integer_sequence<int,
__integer_pack(int)(int())...>'
  351 |   [&]<int... pack> [[__gnu__::__always_inline__]]
(std::integer_sequence<int, pack...>)            \
      |   ^
./simd/bits/simd_abi.h:1514:26: note: in expansion of macro
'_GLIBCXX_SIMD_INT_PACK'
 1514 |                   return
_GLIBCXX_SIMD_INT_PACK(tuple_size_v<decltype(__x02)> - 1, _Is, {
      |                          ^~~~~~~~~~~~~~~~~~~~~~
/home/dvd/Projects/personal/nxx/.pixi/envs/default/lib/gcc/x86_64-conda-linux-gnu/15.2.0/include/c++/bits/utility.h:175:11:
note: 'using std::make_integer_sequence = struct std::integer_sequence<int,
__integer_pack(int)(int())...>' is an alias of TU-local type
'std::integer_sequence<int, __integer_pack(int)(int())...>'
  175 |     using make_integer_sequence
      |           ^~~~~~~~~~~~~~~~~~~~~
/home/dvd/Projects/personal/nxx/.pixi/envs/default/lib/gcc/x86_64-conda-linux-gnu/15.2.0/include/c++/bits/utility.h:164:12:
note: 'struct std::integer_sequence<int, __integer_pack(int)(int())...>'
declared with internal linkage
  164 |     struct integer_sequence
      |            ^~~~~~~~~~~~~~~~
```

Reply via email to