[Bug lto/96591] [8/9/10/11 Regression] ICE with -flto=auto and -O1: tree code ‘typename_type’ is not supported in LTO streams

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Feb 6 06:20:11 GMT 2021


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |lto
           Assignee|jason at gcc dot gnu.org           |unassigned at gcc dot gnu.org
             Status|ASSIGNED                    |NEW

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Arseny Solokha from comment #4)
> Is it somehow related to PR83997? Maybe even a duplicate?

No, not a duplicate.

Reduced a bit more:

struct builtin_simd
{
  using type [[gnu::vector_size(sizeof(scalar_t) * length)]] = scalar_t;
};

struct simd_traits
{
  using scalar_type = int;

  template <typename X>
  using rebind = typename X::type;
};

template <typename simd_t>
constexpr simd_t fill(typename simd_traits::scalar_type const scalar)
{
  return simd_t{scalar};
}

using score_type = typename builtin_simd<int, 1>::type;
// Uncommenting this makes it work:
// const simd_traits::scalar_type n = 8;
score_type data[1]{fill<score_type>(8)};

The difference from uncommenting that line seems to be that then
free_lang_data_in_type is called for simd_traits::scalar_type.  So the problem
seems to be that find_decls_types isn't finding scalar_type in the vector in
the array.  So changing component to LTO and unassigning myself.  Feel free to
change it back if it seems appropriate.


More information about the Gcc-bugs mailing list