https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 34271 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34271&action=edit gcc5-pr64265-2.patch Incremental patch to handle the exceptions, completely untested (don't have spare cycles for that right now), can just throw it into bootstrap/regtest. The only complication has been in the optimization that we actually don't want any __tsan_func_{entry,exit} calls if there are no memory accesses in the function.