https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67408
--- Comment #4 from Sebastian Huber <sebastian.hu...@embedded-brains.de> --- Sorry, I should have linked my patch: https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00028.html I think the your second version doesn't work in case the types are equal, it looks similar to my first attempt to fix this which didn't work on Linux. I try your first version tomorrow.