https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84379
Bug ID: 84379 Summary: Problems with sol2.c GTY handling Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- Target: *-*-solaris2.* While investigating the jit testsuite failures on Solaris with the native as (cf. PR jit/84288), I noticed that there's no GTY markup in gcc/config/sol2.c. Trying to fix that (adding GTY(()) markers to struct comdat_entry and solaris_comdat_htab and including gt-sol2.h resulted in code that wouldn't even compile: In file included from /vol/gcc/src/hg/trunk/solaris/gcc/coretypes.h:423:0, from /vol/gcc/src/hg/trunk/solaris/gcc/config/sol2.c:23: /vol/gcc/src/hg/trunk/solaris/gcc/hash-table.h: In instantiation of 'void gt_ggc_mx(hash_table<E>*) [with E = comdat_entry_hasher]': ./gt-sol2.h:28:19: required from here /vol/gcc/src/hg/trunk/solaris/gcc/hash-table.h:1049:39: error: 'ggc_maybe_mx' is not a member of 'comdat_entry_hasher' E::ggc_maybe_mx (h->m_entries[i]); ^ /vol/gcc/src/hg/trunk/solaris/gcc/hash-table.h: In instantiation of 'void gt_pch_nx(hash_table<E>*) [with D = comdat_entry_hasher]': ./gt-sol2.h:44:19: required from here /vol/gcc/src/hg/trunk/solaris/gcc/hash-table.h:1084:33: error: 'pch_nx' is not a member of 'comdat_entry_hasher' D::pch_nx (h->m_entries[i]); ^ /vol/gcc/src/hg/trunk/solaris/gcc/hash-table.h: In instantiation of 'void hashtab_entry_note_pointers(void*, void*, gt_pointer_operator, void*) [with D = comdat_entry_hasher; gt_pointer_operator = void (*)(void*, void*)]': /vol/gcc/src/hg/trunk/solaris/gcc/hash-table.h:1076:74: required from 'void gt_pch_nx(hash_table<E>*) [with D = comdat_entry_hasher]' ./gt-sol2.h:44:19: required from here /vol/gcc/src/hg/trunk/solaris/gcc/hash-table.h:1067:47: error: 'pch_nx' is not a member of 'comdat_entry_hasher' D::pch_nx (map->m_entries[i], op, cookie); ^ make[3]: *** [/vol/gcc/src/hg/trunk/solaris/gcc/config/t-sol2:36: sol2.o] Error 1 I haven't yet been able to fix that. I've also tried a build with --enable-checking=yes,gcac to determine if the jit testsuite failures observed are really caused by GC issues. However, the 32-bit build would abort early with an OOM error, and the 64-bit build times were so over-the-top that they probably wouldn't complete in a week.