This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/28196] New: miscompiled initialization of a constant pointer reference with offset (ppc64 target)
- From: "inbox at b-q-c dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2006 20:40:40 -0000
- Subject: [Bug c/28196] New: miscompiled initialization of a constant pointer reference with offset (ppc64 target)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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