https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116907
--- Comment #22 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Eric Botcazou from comment #21) > > So the TREE_BLOCK (expr) has been free'd. > > Right. The TREE_BLOCK for an expression is: > > if (IS_EXPR_CODE_CLASS (c)) > return LOCATION_BLOCK (t->exp.locus); > > and "locus" is just an integer so the GC marking probably stops there. That makes me think the location's blocks are not being copied correctly when it comes to templates. But I could be wrong.