The bug in gcc seems to be not printing "dereferencing type-punned pointer will break strict-aliasing rules" warning, as either '-fno-strict-aliasing' or wrapping the struct in an union with short[6] seems to fix the problem.
On not quite related note: would have been nice if the intended output of that test program was noted. While you can calculate it on your own, it would make for a better testcase.
The bug in gcc seems to be not printing "dereferencing type-punned pointer will break strict-aliasing rules" warning, as either '-fno-strict- aliasing' or wrapping the struct in an union with short[6] seems to fix the problem.
On not quite related note: would have been nice if the intended output of that test program was noted. While you can calculate it on your own, it would make for a better testcase.