This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/28196] New: miscompiled initialization of a constant pointer reference with offset (ppc64 target)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]