The following code is miscompiled when using -m64 (=ppc64) target:
const static double a = 1.0;
const static double *b = (double*)&a - 1;
&b[1] should be &a, but it's not - there is an additional offset of 0x10000
--
Summary: miscompiled initialization of a constant pointer
reference with offset (ppc64 target)
Product: gcc
Version: 4.0.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: inbox at b-q-c dot com
GCC build triplet: powerpc-apple-darwin8.6
GCC host triplet: powerpc-apple-darwin8.6
GCC target triplet: powerpc-apple-darwin8.6 (ppc64)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28196