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] New: Strange bug / incorrect code generation with SSE


The following test program, when compiled with 
g++ -O2 -march=pentium4 -msse 
will segfault, at least on the machines I tried it on: 
* Pentium III (Katmai) 
* Intel(R) Pentium(R) 4 CPU 3.00GHz 
* Intel(R) Xeon(TM) CPU 2.40GHz 
 
When allocating fewer vectors, it sometimes works. Oh, and it also fails with 
intels own compiler... 
 
#include <xmmintrin.h> 
#include <stdio.h> 
 
class Vector4 
{ 
public: 
	Vector4() { vec = _mm_setzero_ps(); } 
 
	__m128 vec; 
}; 
 
int main(int argc, char **argv) 
{ 
	Vector4 *foo = new Vector4[200*200]; 
	delete foo; 
}

-- 
           Summary: Strange bug / incorrect code generation with SSE
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ma1flfs at bath dot ac dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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]