http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51174
--- Comment #12 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-18 18:20:50 UTC --- Your patch will fix the problem, but, as I wrote in comment 10, I think it is wrong. I guess you can change the semantics of tm_mangle() to return NULL for NULL argument, but it covers up potential bugs. tm_mangle() should not be called with NULL argument and any caller that does should be fixed.