https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83208
--- Comment #3 from ktkachov at gcc dot gnu.org --- The testcase is "fixed" by using -fno-strict-aliasing. In this example pointers c and d alias each other, they are of incompatible types and they are both dereferenced, so the testcase has undefined behaviour.