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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1072650

Title:
  gcc -O2 produces incorrect code for accessing struct by its address

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1072650/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to