This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/11300] New: Internal Error: SeqFault -O2 only compiling kde-arts
- From: "marco dot walther at sun dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2003 23:02:43 -0000
- Subject: [Bug c/11300] New: Internal Error: SeqFault -O2 only compiling kde-arts
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11300
Summary: Internal Error: SeqFault -O2 only compiling kde-arts
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marco dot walther at sun dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: sparc-sun-solaris2.9
GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9
The problem below happens only with -O2. The -fPIC does not make a difference.
Please let me know if you need additional information.
Thanks,
-- Marco
-----------------------------------------------------------------------------
marcow@jena:/export2/src/KDE3.1.2/arts-1.1.2/flow/gsl>gcc -O2 -fPIC -v x.i
Reading specs from
/export/home/marcow/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/specs
Configured with: ../gcc-3.3/configure
--with-gcc-version-trigger=/reddisk1/marco/gnu/gcc/gcc-3.3/gcc/version.c
--prefix=/export/home/marcow/usr/local --enable-shared --with-gnu-as
--with-gnu-ld
Thread model: posix
gcc version 3.3
/export/home/marcow/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/cc1
-fpreprocessed x.i -quiet -dumpbase x.i -auxbase x -O2 -version -fPIC -o
/tmp/ccPH7e7w.s
GNU C version 3.3 (sparc-sun-solaris2.9)
compiled by GNU C version 3.3.
GGC heuristics: --param ggc-min-expand=82 --param ggc-min-heapsize=98304
gslfft.c: In function `gsl_power2_fft256analysis_skip2':
gslfft.c:3565: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
marcow@jena:/export2/src/KDE3.1.2/arts-1.1.2/flow/gsl>gcc -v
Reading specs from
/export/home/marcow/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/specs
Configured with: ../gcc-3.3/configure
--with-gcc-version-trigger=/reddisk1/marco/gnu/gcc/gcc-3.3/gcc/version.c
--prefix=/export/home/marcow/usr/local --enable-shared --with-gnu-as
--with-gnu-ld
Thread model: posix
gcc version 3.3
marcow@jena:/export2/src/KDE3.1.2/arts-1.1.2/flow/gsl>/bin/uname -a
SunOS jena 5.9 Generic_112233-04 sun4u sparc SUNW,Ultra-60
-------------------------------------------------------------------------
Stack trace:
marcow@jena:/export2/src/KDE3.1.2/arts-1.1.2/flow/gsl>gdb
/export/home/marcow/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/cc1
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) run -fpreprocessed x1.i -quiet -dumpbase x1.i -auxbase x1 -O2 -version -o
/tmp/ccLYGLGb.s
Starting program:
/export/home/marcow/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/cc1
-fpreprocessed x1.i -quiet -dumpbase x1.i -auxbase x1 -O2 -version -o
/tmp/ccLYGLGb.s
GNU C version 3.3 (sparc-sun-solaris2.9)
compiled by GNU C version 3.3.
GGC heuristics: --param ggc-min-expand=82 --param ggc-min-heapsize=98304
Program received signal SIGSEGV, Segmentation fault.
0x1ec980 in calculate_giv_inc (pattern=0x0, src_insn=0x3cfde8, regno=319)
at ../../gcc-3.3/gcc/unroll.c:1690
1690 goto retry;
(gdb) where
#0 0x1ec980 in calculate_giv_inc (pattern=0x0, src_insn=0x3cfde8, regno=319)
at ../../gcc-3.3/gcc/unroll.c:1690
#1 0x1ed164 in copy_loop_body (loop=0x3e6098, copy_start=0x3c7130,
copy_end=0x3c7238, map=0x40c528, exit_label=0x0, last_iteration=1,
unroll_type=UNROLL_COMPLETELY, start_label=0x3cfe98, loop_end=0x3d2058,
insert_before=0x3d2058, copy_notes_from=0x3d2058)
at ../../gcc-3.3/gcc/unroll.c:1942
#2 0x1eb2a8 in unroll_loop (loop=0x3e6098, insn_count=3961400,
strength_reduce_p=1) at ../../gcc-3.3/gcc/unroll.c:1249
#3 0x151b0c in strength_reduce (loop=0x3e6098, flags=8)
at ../../gcc-3.3/gcc/loop.c:5363
#4 0x14a220 in scan_loop (loop=0x3e6098, flags=8)
at ../../gcc-3.3/gcc/loop.c:1181
#5 0x149e60 in loop_optimize (f=0x35aa50, dumpfile=0x2, flags=8)
at ../../gcc-3.3/gcc/loop.c:555
#6 0x1dbc60 in rest_of_compilation (decl=0x3a1780)
at ../../gcc-3.3/gcc/toplev.c:2941
#7 0x26310 in c_expand_body (fndecl=0x3a1780, nested_p=0, can_defer_p=3347456)
at ../../gcc-3.3/gcc/c-decl.c:6567
#8 0x26084 in finish_function (nested=0, can_defer_p=1)
at ../../gcc-3.3/gcc/c-decl.c:6407
#9 0x124d8 in yyparse () at c-parse.y:403
#10 0x1b4d0 in c_common_parse_file (set_yydebug=0)
at ../../gcc-3.3/gcc/c-lex.c:159
#11 0x1d9e70 in compile_file () at ../../gcc-3.3/gcc/toplev.c:2130
#12 0x1df23c in do_compile () at ../../gcc-3.3/gcc/toplev.c:5369
#13 0x1df300 in toplev_main (argc=12, argv=0xffbff89c)
at ../../gcc-3.3/gcc/toplev.c:5400
-----------------------------------------------------------------------------
Source code (part of preprocessed KDE-3.1.2 arts-1.1.2/flow/gsl/gslfft.c
static void gsl_power2_fft128analysis_skip2(const double *X, double *Y)
{
/* Marco test */
}
void
gsl_power2_fft256analysis_skip2 (const double *X, double *Y)
{
register unsigned int butterfly, block, offset;
register double Wre, Wim;
butterfly = block = offset = 0, Wre = Wim = 0.0;
# 3464 "gslfft.c"
gsl_power2_fft128analysis_skip2 (X, Y);
gsl_power2_fft128analysis_skip2 (X + 256, Y + 256);
{
static const double Wconst256[] = {
+0.999698818696204, +0.024541228522912,
+0.998795456205172, +0.049067674327418,
+0.997290456678690, +0.073564563599667,
+0.995184726672197, +0.098017140329561,
+0.992479534598710, +0.122410675199216,
+0.989176509964781, +0.146730474455362,
+0.985277642388941, +0.170961888760301,
+0.980785280403230, +0.195090322016128,
+0.975702130038529, +0.219101240156870,
+0.970031253194544, +0.242980179903264,
+0.963776065795440, +0.266712757474898,
+0.956940335732209, +0.290284677254462,
+0.949528180593037, +0.313681740398892,
+0.941544065183021, +0.336889853392220,
+0.932992798834739, +0.359895036534988,
+0.923879532511287, +0.382683432365090,
+0.914209755703531, +0.405241314004990,
+0.903989293123443, +0.427555093430282,
+0.893224301195515, +0.449611329654607,
+0.881921264348355, +0.471396736825998,
+0.870086991108711, +0.492898192229784,
+0.857728610000272, +0.514102744193222,
+0.844853565249707, +0.534997619887097,
+0.831469612302545, +0.555570233019602,
+0.817584813151584, +0.575808191417845,
+0.803207531480645, +0.595699304492433,
+0.788346427626606, +0.615231590580627,
+0.773010453362737, +0.634393284163645,
+0.757208846506485, +0.653172842953777,
+0.740951125354959, +0.671558954847018,
+0.724247082951467, +0.689540544737067,
+0.707106781186548, +0.707106781186547,
+0.689540544737067, +0.724247082951467,
+0.671558954847018, +0.740951125354959,
+0.653172842953777, +0.757208846506484,
+0.634393284163645, +0.773010453362737,
+0.615231590580627, +0.788346427626606,
+0.595699304492433, +0.803207531480645,
+0.575808191417845, +0.817584813151584,
+0.555570233019602, +0.831469612302545,
+0.534997619887097, +0.844853565249707,
+0.514102744193222, +0.857728610000272,
+0.492898192229784, +0.870086991108711,
+0.471396736825998, +0.881921264348355,
+0.449611329654607, +0.893224301195515,
+0.427555093430282, +0.903989293123443,
+0.405241314004990, +0.914209755703531,
+0.382683432365090, +0.923879532511287,
+0.359895036534988, +0.932992798834739,
+0.336889853392220, +0.941544065183021,
+0.313681740398892, +0.949528180593037,
+0.290284677254462, +0.956940335732209,
+0.266712757474898, +0.963776065795440,
+0.242980179903264, +0.970031253194544,
+0.219101240156870, +0.975702130038529,
+0.195090322016128, +0.980785280403230,
+0.170961888760301, +0.985277642388941,
+0.146730474455362, +0.989176509964781,
+0.122410675199216, +0.992479534598710,
+0.098017140329561, +0.995184726672197,
+0.073564563599667, +0.997290456678690,
+0.049067674327418, +0.998795456205172,
+0.024541228522912, +0.999698818696204,
};
const double *W = Wconst256 - 2;
double *Z = Y + 128;
for (offset = 0; offset < 512; offset += 512) {
{ register double T2re, T2im; T2re = Y[offset] - Y[offset + 256]; T2im =
Y[offset + 1] - Y[offset + 256 + 1]; Y[offset] = Y[offset] + Y[offset + 256];
Y[offset + 1] = Y[offset + 1] + Y[offset + 256 + 1]; Y[offset + 256] = T2re;
Y[offset + 256 + 1] = T2im; };
{ register double T2re, T2im; T2re = Z[offset] + Z[offset + 256 + 1]; T2im
= Z[offset + 1] - Z[offset + 256]; Z[offset] = Z[offset] - Z[offset + 256 + 1];
Z[offset + 1] = Z[offset + 1] + Z[offset + 256]; Z[offset + 256] = T2re;
Z[offset + 256 + 1] = T2im; };
}
for (butterfly = 2; butterfly < 128; butterfly += 2) {
Wre = W[butterfly]; Wim = W[butterfly + 1];
for (block = 0; block < 512; block += 512) {
offset = butterfly + block;
{ register double T1re, T1im, T2re, T2im; T1re = Y[offset + 256] * Wre;
T1im = Y[offset + 256 + 1] * Wre; T2re = Y[offset + 256 + 1] * Wim; T2im =
Y[offset + 256] * Wim; T1re -= T2re; T1im += T2im; T2re = Y[offset] - T1re; T2im
= Y[offset + 1] - T1im; Y[offset] = Y[offset] + T1re; Y[offset + 1] = Y[offset +
1] + T1im; Y[offset + 256] = T2re; Y[offset + 256 + 1] = T2im; };
{ register double T1re, T1im, T2re, T2im; T1re = Z[offset + 256] * Wim;
T1im = Z[offset + 256 + 1] * Wim; T2re = Z[offset + 256 + 1] * Wre; T2im =
Z[offset + 256] * Wre; T1re += T2re; T1im -= T2im; T2re = Z[offset] + T1re; T2im
= Z[offset + 1] + T1im; Z[offset] = Z[offset] - T1re; Z[offset + 1] = Z[offset +
1] - T1im; Z[offset + 256] = T2re; Z[offset + 256 + 1] = T2im; };
}
}
}
}