[Bug regression/20412] New: ICE when -O1, regression from gcc-3.4.3

kminola at eng dot umd dot edu gcc-bugzilla@gcc.gnu.org
Thu Mar 10 19:01:00 GMT 2005


/*
gcc-4.0 sparc-SunOS bug
                                                                     
gcc-4.0 -O0 -c foo.c // ok
gcc-4.0 -O1 -c foo.c // ICE

% gcc-4.0 -v
Using built-in specs.
Target: sparc-sun-solaris2.8
Configured with: /home/kate/gcc-4.0-20050305/src/gcc-4.0-20050305/configure
--enable-languages=c --prefix=/home/kate/gcc-4.0-20050305/sparc-SunOS
Thread model: posix
gcc version 4.0.0 20050305 (prerelease)
% 

*/
                                                                     
                                                                     
#define FALSE   0
                                                                     
int
foo()
{
  int      a,b,g;
  int      i,len;
  int      stop;
                                                                     
  len = 10;
  stop = FALSE;
  for (i=0; i<len; i++)
  {
    a = bar1() ? 0 : 1;
    b = bar2() ? 0 : 1;
    g = bar3() ? 0 : 1;
                                                                     
    if (stop = ((a+b) % 2 != g)) break;
  }
 
  return stop;
}

-- 
           Summary: ICE when -O1, regression from gcc-3.4.3
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kminola at eng dot umd dot edu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.8
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20412



More information about the Gcc-bugs mailing list