------- Comment #2 from abhishek dot shrivastav24 at gmail dot com 2009-05-25 14:36 ------- (In reply to comment #1) > Works for me (your simple program is not a valid program). >
The whole program is like this: /* sample.c */ #include <stdio.h> #define N 1000 int main() { int a[N], b[N], c[N], i; for(i=0;i<N;i++) b[i]=c[i]=i; for(i=0;i<N;i++) a[i]=b[i]+c[i]; for(i=0;i<N;i++) printf("%d", a[i]); } compile using gcc version 4.3.*, using gcc -S -ftree-vectorize -ftree-vectorizer-verbose=10 -msse2 -O2 sample.c Now, view the assembly file generated and also the verbose, it always prints when analyzing in function vect_analyze_data_refs_alignment ***can't force alignment of ref: b[i_43]***, while it does not need alignment, as it is already aligned. Simply changed the instruction movdqu to movdqa and no segmentation fault would occur, as the array references are aligned. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40243