[Bug c++/38063] New: C++ operator new returns misaligned address

David dot Monniaux at imag dot fr gcc-bugzilla@gcc.gnu.org
Sat Nov 8 23:03:00 GMT 2008


On IA32, operator new returns an address multiple of 8 in all cases, even if
called on a type with strict alignment (16).

typedef double double2 __attribute__ ((vector_size(16)));

int main() {
  std::cout << __alignof__(double2) << " " << ((void*) new double2) <<
std::endl;
}

returns:
16 0x8107008


-- 
           Summary: C++ operator new returns misaligned address
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: David dot Monniaux at imag dot fr
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38063



More information about the Gcc-bugs mailing list