This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/29884] gcc-4.1.1, gcc-4.0.1 generate segfaulting SSE code
- From: "sergstesh at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2006 06:10:10 -0000
- Subject: [Bug c/29884] gcc-4.1.1, gcc-4.0.1 generate segfaulting SSE code
- References: <bug-29884-13529@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from sergstesh at yahoo dot com 2006-11-18 06:10 -------
Created an attachment (id=12637)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12637&action=view)
the "C" file causing the failure
If I run this file, it fails with:
"
checkpoint 1
&signal_spectrum_L[0]=80491e0
&signal_spectrum_R[0]=8049140
checkpoint 2
half_number_of_samples=16 bin_number=1
bin_number=1
&signal_spectrum_L[1]=80491e4
checkpoint 3
Segmentation fault
".
Which means that this:
102 v_r_signal_L.v = *(vFloat *)&signal_spectrum_L[bin_number];
is the offending line.
Please pay attention to these lines:
157 *(vFloat *)&signal_spectrum_L[bin_number] = v_r_signal_L.v;
158 *(vFloat *)&signal_spectrum_R[bin_number] = v_r_signal_R.v;
159
160 signal_spectrum_L[number_of_samples_minus_bin_number] =
v_i_signal_L.f[0];
161 signal_spectrum_R[number_of_samples_minus_bin_number] =
v_i_signal_R.f[0];
162
163 signal_spectrum_L[number_of_samples_minus_bin_number_minus_1] =
v_i_signal_L.f[1];
164 signal_spectrum_R[number_of_samples_minus_bin_number_minus_1] =
v_i_signal_R.f[1];
165
166 signal_spectrum_L[number_of_samples_minus_bin_number_minus_3] =
v_i_signal_L.f[3];
167 signal_spectrum_R[number_of_samples_minus_bin_number_minus_3] =
v_i_signal_R.f[3];
- they are well below the offending line #102 in the same loop body, so
at first site they shouldn't matter - segfaults occurs before them.
Well, it's not the case, they do matter, if they are commented out, the
segfault does not occur, the program completes normally.
The above line #157..167 are the missing functional piece I discovered
while debugging, it's writeback.
I'll upload the .i files, as required, so you'll be able to compile
the files and hopefully reproduce the bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29884