i tried to compile mysql with a lot of optimizations for pentiums (as far as i recognised in the gcc-manual). With that optimizations gcc segfaults as it compiles pack_isam.c. The command was: gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I../include -save-temps -O3 -DDBUG_OFF -O3 -ffast-math -funroll-loops -march=i686 -malign-double -m128bit-long-double -maccumulate-outgoing-args -momit-leaf-frame-pointer -fomit-frame-pointer -c pack_isam.c The compiler output was: pack_isam.c: In function `compress': pack_isam.c:646: Internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. Release: 3.0.1 (maybe in earlier versions too) Environment: i686-pc-linux-gnu / kernel 2.4.10 / SuSE 7.0 / glibc 2.1
Fix: the file compiled proberbly when i don't use -m128bit-long-double
From: Reichelt <reichelt@igpm.rwth-aachen.de> To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, georg@steffers.org Cc: Subject: Re: optimization/4490 Date: Mon, 8 Oct 2001 15:37:49 +0200 Hi, the problem can be reduced to the following testcase: void f() { unsigned long long ull; double d=ull; } I get a seg-fault when I try to compile this with "gcc -m128bit-long-double -c <filename>" using gcc 3.0 on an i686-pc-linux-gnu. The problem seems to be the cast from "unsigned long long" to "double" with "-m128bit-long-double" enabled (so it's probably not an optimization issue). In the original testcase this leads into trouble with the last "printf" statement in the function "compress". Greetings, Volker Reichelt http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4490&database=gcc
State-Changed-From-To: open->analyzed State-Changed-Why: Reproduced error from Volker's simplified testcase. Error occurred in gcc 3.1 and gcc 3.0 branches. Running cc1plus in the debugger results in: Program received signal SIGSEGV, Segmentation fault. 0x08229906 in ix86_constant_alignment (exp=0x40177dc0, align=32) at config/i386/i386.c:10601 10601 if (TYPE_MODE (TREE_TYPE (exp)) == DFmode && align < 64) where exp is NULL.
From: rodrigc@gcc.gnu.org To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, georg@steffers.org, nobody@gcc.gnu.org, reichelt@igpm.rwth-aachen.de Cc: Subject: Re: optimization/4490: gcc 3.0.1 segfaults while compiling pack_isam.c of mysql Date: 2 Dec 2001 02:06:19 -0000 Synopsis: gcc 3.0.1 segfaults while compiling pack_isam.c of mysql State-Changed-From-To: open->analyzed State-Changed-By: rodrigc State-Changed-When: Sat Dec 1 18:06:18 2001 State-Changed-Why: Reproduced error from Volker's simplified testcase. Error occurred in gcc 3.1 and gcc 3.0 branches. Running cc1plus in the debugger results in: Program received signal SIGSEGV, Segmentation fault. 0x08229906 in ix86_constant_alignment (exp=0x40177dc0, align=32) at config/i386/i386.c:10601 10601 if (TYPE_MODE (TREE_TYPE (exp)) == DFmode && align < 64) where exp is NULL. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4490&database=gcc
State-Changed-From-To: analyzed->suspended State-Changed-Why: The problem is that the front-end isn't told about the 128-bit type, so type_for_mode returns NULL. -m128bit-long-double really needs to be using TFmode within the compiler, rather than playing games with XFmode.
From: Wolfgang Bangerth <bangerth@ices.utexas.edu> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: optimization/4490 Date: Thu, 24 Apr 2003 19:40:19 -0500 (CDT) This can be reproduced still with today's 3.3 and 3.4 branches. W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/
From: Wolfgang Bangerth <bangerth@ices.utexas.edu> To: rth@gnu.gcc.org Cc: gcc-gnats@gcc.gnu.org Subject: optimization/4490 Date: Thu, 24 Apr 2003 19:43:29 -0500 (CDT) Richard, I just closed a report for which I found that it is a duplicate of 4490. What startles me with that one is that it is suspended. What is the reason for that? If this just waits for someone to fix it, I think we'd better leave it analyzed. "suspended" only seems like the proper choice when we are waiting for external events to happen (resolution of a standard defect report, branch to merge, etc). Thanks Wolfgang ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/
From: Richard Henderson <rth@redhat.com> To: Wolfgang Bangerth <bangerth@ices.utexas.edu> Cc: gcc-gnats@gcc.gnu.org Subject: Re: optimization/4490 Date: Thu, 24 Apr 2003 20:31:41 -0700 On Thu, Apr 24, 2003 at 07:43:29PM -0500, Wolfgang Bangerth wrote: > What startles me with that one is that it is suspended. What is the reason > for that? I use "suspended" for things we acknowledge are bugs, but have no plans to ever fix. r~
From: Wolfgang Bangerth <bangerth@ices.utexas.edu> To: Richard Henderson <rth@redhat.com> Cc: gcc-gnats@gcc.gnu.org Subject: Re: optimization/4490 Date: Fri, 25 Apr 2003 10:18:59 -0500 (CDT) > > What startles me with that one is that it is suspended. What is the reason > > for that? > > I use "suspended" for things we acknowledge are bugs, but > have no plans to ever fix. I'm not sure whether I like the approach, but I see that it's consistent with our guidelines. For similar cases: can you leave a note in the audit trail of this "no plans to fix" when you suspend a PR? Thanks for the clarification! W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/
It appears that this can be fixed by changing all of the XFmode patterns with !TARGET_64BIT in the condition to instead use !TARGET_128BIT_LONG_DOUBLE in the condition.
I installed a patch from Kelley Cook that does what I suggested, and which makes both the minimal testcase work and the original pack_isam.i testcase work. This can probably closed now.
Jim Wilson installed a patch for this.
Subject: Bug 4490 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: kcook@gcc.gnu.org 2003-07-19 13:56:01 Modified files: gcc : ChangeLog gcc/doc : invoke.texi Log message: PR optimization/4490 * doc/invoke.texi (m96bit-long-double, m128bit-long-double): Reword documentation to accurately reflect what these options do. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.673&r2=1.16114.2.674 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.209.2.41&r2=1.209.2.42
Subject: Bug 4490 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: kcook@gcc.gnu.org 2003-12-10 04:22:52 Modified files: gcc : ChangeLog gcc/config/i386: i386.md Log message: 2003-12-09 Kelley Cook <kelleycook@wideopenwest.com> 2003-06-04 Kelley Cook <kelleycook@wideopenwest.com> PR optimization/4490 * config/i386/i386.md: Don't use XFMode if TARGET_128BIT_LONG_DOUBLE. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.832&r2=1.16114.2.833 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.404.2.20&r2=1.404.2.21