Bug 27535 - ICE with -O3 -fsee
Summary: ICE with -O3 -fsee
Status: RESOLVED DUPLICATE of bug 27437
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2006-05-10 19:02 UTC by Kate Minola
Modified: 2006-05-30 10:06 UTC (History)
8 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2006-05-21 01:30:07


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Minola 2006-05-10 19:02:13 UTC
/* 

ICE using gcc-4.2-20060506 on x86_64-unknown-linux-gnu
Regression from gcc-4.1.0

Source cut down from gmp-4.2.1/tests/refmpf.c

% gcc-4.2-20060506 -O3 -c foo.c
foo.c: In function âfooâ:
foo.c:27: 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.
%
% gcc-4.2-20060506 -O2 -c foo.c
%
% gcc-4.2-20060506 -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/kate/test/gcc-4.2-20060506/configure 
--enable-languages=c --prefix=/home/kate/test/bin/x86_64-Linux
Thread model: posix
gcc version 4.2.0 20060506 (experimental)
%
%
% gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.1.0/src/gcc-4.1.0/configure
--enable-languages=c,c++
--prefix=/usr/local/gcc-4.1.0/x86_64-Linux-g++
Thread model: posix
gcc version 4.1.0
%
% gcc -O3 -c foo.c
% 
*/

#include <stdlib.h>

typedef struct
{
  int a;                        
} strt;

typedef strt *ptr;

void
foo (ptr w, int u, int v)
{
  int b;

  if (u == 0)
    {
      b = v > 0;
      goto done;
    }
  if (v == 0)
    {
      b = u < 0;
    }

done:
  w->a = b == 0 ? 1 : -1;
}
Comment 1 Andrew Pinski 2006-05-10 19:06:19 UTC
Oh, this is no longer a regression as -fsee is not enabled by default in newer versions of 4.2 (a day after it was enabled by default for -O3, it was turned off to fix some regressions at -O3).
Comment 2 Kazu Hirata 2006-05-21 01:24:31 UTC
Can you still reproduce this bug with the most recent mainline?

I am having trouble reproducing this bug.
Comment 3 Kazu Hirata 2006-05-21 01:28:12 UTC
Confirmed with -O3 -fsee.
Comment 4 Andrew Pinski 2006-05-29 23:03:57 UTC

*** This bug has been marked as a duplicate of 27437 ***