This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/29818] New: code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: "sergstesh at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Nov 2006 16:36:14 -0000
- Subject: [Bug c/29818] New: code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A (now pretty simple) piece of code segfaults when compiled with gcc-3.4.6,
but runs fine with gcc-4.1.1.
The offending line is:
vtmp1.v = *(vFloat *)&inp_array_1[bn];
-please wait until upload the source file.
Both gcc-3.4.6 and gcc-4.1.1 were built by myself; the same code segfaults
when compiled using stock Mandrivaa gcc-3.3.6 and runs fine when compiled
using stock Mandriva gcc-4.0.1, so, I guess, it doesn't really matter
how I built gcc-3.4.6 and gcc-4.1.1.
Anyway, gcc-3.4.6 and gcc-4.1.1 were built using my
http://appsfromscratch.berlios.de/
tool, I can send the log files showing pretty standard, except for
local installation dir, configuration options.
When the code fails (i.e. compiled by gcc-3.4.6), the screen output is:
"
checkpoint 1
&inp_array_1[0]=80498e0
checkpoint 2
bn=1
&inp_array_1[1]=80498e4
checkpoint 3
Segmentation fault
";
when the code runs fine (i.e. compiled by gcc-4.1.1), the screen output is:
"
checkpoint 1
&inp_array_1[0]=80498e0
checkpoint 2
bn=1
&inp_array_1[1]=80498e4
checkpoint 3
checkpoint 4
bn=5
&inp_array_1[5]=80498f4
checkpoint 3
checkpoint 4
bn=9
&inp_array_1[9]=8049904
checkpoint 3
checkpoint 4
inp_array_1[0]=1
inp_array_1[1]=2
inp_array_1[2]=3
inp_array_1[3]=4
inp_array_1[4]=5
inp_array_1[5]=6
inp_array_1[6]=7
inp_array_1[7]=8
inp_array_1[8]=9
inp_array_1[9]=10
inp_array_1[10]=11
inp_array_1[11]=12
inp_array_1[12]=13
inp_array_1[13]=14
inp_array_1[14]=15
inp_array_1[15]=16
inp_array_1[16]=17
inp_array_1[17]=18
inp_array_1[18]=19
inp_array_1[19]=20
inp_array_1[20]=21
inp_array_1[21]=22
inp_array_1[22]=23
inp_array_1[23]=24
inp_array_1[24]=25
inp_array_1[25]=26
inp_array_1[26]=27
inp_array_1[27]=28
inp_array_1[28]=29
inp_array_1[29]=30
inp_array_1[30]=31
inp_array_1[31]=32
".
The command line used for compilation:
/AppsFromScratchWD/install/gcc-3.4.6/bin/gcc -save-temps -O2 -Wall -msse
-mfpmath=sse -o sse_bug sse_bug.c
.
The command line used to run:
./sse_bug
.
--
Summary: code with SSE segfaults with gcc-3.4.6, runs fine with
gcc-4.1.1
Product: gcc
Version: 3.4.6
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sergstesh at yahoo dot com
GCC build triplet: Linux comp.home.net 2.6.12-27mdk-i686-up-4GB #1 Tue Sep
26 12:41
GCC host triplet: Linux comp.home.net 2.6.12-27mdk-i686-up-4GB #1 Tue Sep
26 12:41
GCC target triplet: Linux comp.home.net 2.6.12-27mdk-i686-up-4GB #1 Tue Sep
26 12:41
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29818
- Follow-Ups:
- [Bug c/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: sergstesh at yahoo dot com
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: pinskia at gcc dot gnu dot org
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: pinskia at gcc dot gnu dot org
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: sergstesh at yahoo dot com
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: pcarlini at suse dot de
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: sergstesh at yahoo dot com
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: bangerth at dealii dot org
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: sergstesh at yahoo dot com
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: sergstesh at yahoo dot com
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: pinskia at gcc dot gnu dot org
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: sergstesh at yahoo dot com
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: bangerth at dealii dot org
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: bangerth at dealii dot org
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: sergstesh at yahoo dot com
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: pinskia at gcc dot gnu dot org
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: sergstesh at yahoo dot com
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: pinskia at gcc dot gnu dot org
- [Bug target/29818] code with SSE segfaults with gcc-3.4.6, runs fine with gcc-4.1.1
- From: sergstesh at yahoo dot com