From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21966 invoked by alias); 18 Nov 2006 06:10:20 -0000 Received: (qmail 21934 invoked by uid 48); 18 Nov 2006 06:10:10 -0000 Date: Sat, 18 Nov 2006 06:10:00 -0000 Message-ID: <20061118061010.21933.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/29884] gcc-4.1.1, gcc-4.0.1 generate segfaulting SSE code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sergstesh at yahoo dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg01581.txt.bz2 List-Id: ------- 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