On Mon, 25 Feb 2008, Richard Guenther wrote: > On Mon, 25 Feb 2008, H.J. Lu wrote: > > > Uros failed with --enable-checking=release and I failed with > > --enable-checking=assert. > > You can try either one. > > That reproduces it. I have reverted the patch for now.
It turns out that PCH and ggc_free don't play along well appearantly. Both making ggc_free a NOP or disabling the ggc_free call in cp/decl.c:2157 fixes the problem for me (that is in duplicate_decls). So we need to make sure to remove the decl from the global hashtable before ggc_freeing it, otherwise another object may become life in the freed memory and the global map will still point to it. Richard.