https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116535
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Namely, the following seems to be problematic if the code is run concurrently.
The FORK part is actually quite old r207515 (Feb 2014) as is the following code
with flag_wpa, which was added in r217489 (Nov 2014), but admittedly slightly
before.
gcc/lto-cgraph.cc
void
output_offload_tables (void)
{
...
/* In WHOPR mode during the WPA stage the joint offload tables need to be
streamed to one partition only. That's why we free offload_funcs and
offload_vars after the first call of output_offload_tables. */
if (flag_wpa)
{
vec_free (offload_funcs);
vec_free (offload_vars);
vec_free (offload_ind_funcs);
}
}
which obviously fails if multiple forks process such that each forks writes it
once, before freeing the vector ...