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++/15795] No way to teach operator new anything about alignment requirements


------- Additional Comments From bangerth at dealii dot org  2004-06-03 17:39 -------
Oh, I should have said that indeed on my system, the memory location 
is 8-byte aligned, not 16-byte aligned. If I do make it 16-byte 
aligned, for example with a hack like this 
  char *p = new char[10000]; 
  __m128 * foo = (__m128*)(((int)(p+16))/16*16); 
(for which I have no idea whether it is in accordance with aliasing rules), 
then the program correctly succeeds. Nevertheless, I believe that gcc 
should have some way of transmitting alignment requirements when it allocated 
memory. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Strange bug / incorrect code|No way to teach operator new
                   |generation with SSE         |anything about alignment
                   |                            |requirements


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


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