hi all,
(first of all, sorry for this unprofessional bug report)
compiling my application with gcc-4.3 with -O2 -ftree-vectorize, it segfaults.
i haven't been able to write a stripped-down test case, but here are the
information, that i gathered:
the constructor of the main data structure of my application contains:
0xb5eb02bd <Environment+205>: movdqa %xmm0,0x1990(%edi)
0xb5eb02c5 <Environment+213>: movdqa %xmm0,0x19a0(%edi)
0xb5eb02cd <Environment+221>: movdqa %xmm0,0x19b0(%edi)
0xb5eb02d5 <Environment+229>: movdqa %xmm0,0x19c0(%edi)
0xb5eb02dd <Environment+237>: movdqa %xmm0,0x19d0(%edi)
0xb5eb02e5 <Environment+245>: movdqa %xmm0,0x19e0(%edi)
0xb5eb02ed <Environment+253>: movdqa %xmm0,0x19f0(%edi)
0xb5eb02f5 <Environment+261>: movdqa %xmm0,0x1a00(%edi)
where %edi contains the this pointer to the class. the problem is, that the
address, that Environment+205 tries to load seems not to be guarrantied to be
aligned to a 16 byte boundary.
in my debugging session, it pointed to 0x8369f58, 0x8369f58+0x1990 is not
aligned as required by the movdqa instruction, though ...
i am using gcc-4.3:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure linux gnu
Thread model: posix
gcc version 4.3.1 20080401 (prerelease) (Debian 4.3.0-3)
the command line options are: -g -O3 -march=core2 -mfpmath=sse -msse
-ftemplate-depth-4096 -Wnon-virtual-dtor -fPIC
unfortunately i haven't been able to construct a smaller test-case ... gcc-4.2
works fine for me ...
the preprocessed source file is attached
--
Summary: bad code generation with -ftree-vectorize
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tim at klingt dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36054