The 'size' argument of ctf_add_sou was size_t. After the prior fixes
for PR121411, this could cause the struct size to be truncated when
encoding extremely large structs on a host where size_t is smaller than
unsigned HOST_WIDE_INT, manifesting for example as the test failure
reported in PR121903. Change the argument to uHWI to resolve the issue.
PR debug/121411
PR debug/121903
gcc/
* ctfc.h (ctf_add_sou): Change size arg from size_t to uHWI.
* ctfc.cc (ctf_add_sou): Likewise.
ctf_dtdef_ref
ctf_add_sou (ctf_container_ref ctfc, uint32_t flag, const char * name,
- uint32_t kind, size_t size, dw_die_ref die)
+ uint32_t kind, unsigned HOST_WIDE_INT size, dw_die_ref die)
{
ctf_dtdef_ref dtd;
const char *, const ctf_funcinfo_t *,
dw_die_ref, bool, int);
extern ctf_dtdef_ref ctf_add_sou (ctf_container_ref, uint32_t, const char *,
- uint32_t, size_t, dw_die_ref);
+ uint32_t, unsigned HOST_WIDE_INT, dw_die_ref);
extern int ctf_add_enumerator (ctf_container_ref, ctf_dtdef_ref, const char *,
HOST_WIDE_INT, dw_die_ref);