https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78618
--- Comment #15 from janus at gcc dot gnu.org --- (In reply to Steve Kargl from comment #10) > This looks like a used-after-freed bug. Yes, it does. My first suspicion was that the problematic freeing happens at the end of variable_decl (decl.c:2450): gfc_free_expr (initializer); It seems the initializer here has the same ts.u.cl (not a copy) as the symbol 'c'. However, gfc_free_expr (surprisingly) does not free anything in the typespec. Instead it seems the charlen is freed via gfc_free_charlen in 'reject_statement'. Not sure what to do about it ...