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

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Hitting set_overrun from the tt_data_member case actually, not tt_clone_ref.

Reduced:

$ cat 125635.ii 
namespace std {
struct _Vector_base {
  void _M_get_Tp_allocator();
  int _M_impl;
};
template <typename> struct vector : _Vector_base {
  ~vector() { _M_get_Tp_allocator(); }
};
} // namespace std

$ cat 125635_a.C
module;

#include "125635.ii"

export module gc.objects;

export class Object {
public:
    virtual ~Object() = default;
};

export class Value {
};

export using LpValueVector = std::vector<Value>;

$ cat 125635_b.C 
module;

#include "125635.ii"

export module gc.core;
import gc.objects;

//if List::m_items and m_stack both have LpValueVector or std::list it works
struct Vm {
    std::vector<Value> m_stack;
};

$ cat 125635_c.C 
module;
#include "125635.ii"
export module gc.types;

import gc.objects;
// Unused import, must be present for failure.
import gc.core;

// Must inherit from Object
struct List final : Object {
   LpValueVector m_items;
};

$ cat 125635_d.C 
module;

#include "125635.ii"

export module lisp.reader;

import gc.types;

export class Token {};

export using ReaderTokenVector = std::vector<Token>;

$ g++ -fmodules 125365_{a,b,c,d}.C
In module imported at 125635_d.C:7:1:
gc.types: error: failed to read compiled module cluster 3: Bad file data
gc.types: note: compiled module file is ‘gcm.cache/gc.types.gcm’
125635_d.C:11:51: fatal error: failed to load pendings for ‘std::vector’
   11 | export using ReaderTokenVector = std::vector<Token>;
      |                                                   ^

Reply via email to