The attached code is OK with gcc 3.3.6 debian and gcc 4.0 without -O2 but does not generate pmaddw
instruction with gcc 4.0 and -O2.
The compile line is
/usr/local/bin/gcc -save-temps -msse2 -Wall -O2 -o bug-report bug-report.c
and the values are NOT initialized in the gcc 4.0 -O2 setup.
Created attachment 9160 [details]
Does -fno-strict-aliasing help as you are violating C aliasing rules:
a128 = _mm_load_si128((__m128i *)a_storage);
Well, ld do segfault now...
To be honest I don't know about C aliasing rules ;-(
*** This bug has been marked as a duplicate of 21920 ***
Sorry, no segfault of ld. My mistake - wrong compilation options.