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

            Bug ID: 119755
           Summary: type_traits:828:11: fatal error: failed to load
                    pendings for 'std::__is_one_of'
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

Given a file with the single line:

#include <stdbit.h>


Using a recent trunk:

g++ -fsearch-include-path  ../include/c++/15.0.1/bits/std.compat.cc
-std=gnu++26 -x c++ - -fmodules

It fails with:

In module imported at
/home/jwakely/gcc/15/include/c++/15.0.1/bits/std.compat.cc:30:8:
/home/jwakely/gcc/15/include/c++/15.0.1/type_traits: In substitution of
‘template<class _Tp, class ... _Types> using std::__is_one_of =
std::__or_<std::is_same<_Tp, _Types>...> [with _Tp = unsigned char; _Types =
{unsigned char, short unsigned int, unsigned int, long unsigned int, long long
unsigned int, __int128 unsigned}]’:
/home/jwakely/gcc/15/include/c++/15.0.1/type_traits:828:11:   required by
substitution of ‘template<class _Tp> using std::__is_unsigned_integer =
std::__is_one_of<typename std::remove_cv< <template-parameter-1-1> >::type,
unsigned char, short unsigned int, unsigned int, long unsigned int, long long
unsigned int, __int128 unsigned> [with _Tp = unsigned char]’
  828 |     using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>,
      |           ^~~~~~~~~~~~~~~~~~~~~
/home/jwakely/gcc/15/include/c++/15.0.1/bit:397:62:   required from ‘unsigned
int __gnu_cxx::stdc_leading_zeros(_Tp) [with _Tp = unsigned char]’
  397 |     concept __unsigned_integer = __is_unsigned_integer<_Tp>::value;
      |                                                              ^~~~~
/home/jwakely/gcc/15/include/c++/15.0.1/stdbit.h:63:28:   required from here
   63 | { return stdc_leading_zeros(__value); }
      |          ~~~~~~~~~~~~~~~~~~^~~~~~~~~
std: error: failed to read compiled module cluster 4625: Bad file data
std: note: compiled module file is ‘gcm.cache/std.gcm’
In file included from /home/jwakely/gcc/15/include/c++/15.0.1/concepts:48,
                 from /home/jwakely/gcc/15/include/c++/15.0.1/bit:38,
                 from /home/jwakely/gcc/15/include/c++/15.0.1/stdbit.h:33,
                 from
/home/jwakely/gcc/15/include/c++/15.0.1/bits/std.compat.cc:26:
/home/jwakely/gcc/15/include/c++/15.0.1/type_traits:828:11: fatal error: failed
to load pendings for ‘std::__is_one_of’
  828 |     using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>,
      |           ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Reply via email to