From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19591 invoked by alias); 8 Feb 2006 21:00:26 -0000 Received: (qmail 19578 invoked by uid 48); 8 Feb 2006 21:00:23 -0000 Date: Wed, 08 Feb 2006 21:00:00 -0000 Subject: [Bug regression/26180] New: optimization regression on x86-SunOS X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kminola at eng dot umd dot edu" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg00822.txt.bz2 List-Id: /* % gcc -v Using built-in specs. Target: i386-pc-solaris2.9 Configured with: /usr/local/gcc-4.0.2/src/gcc-4.0.2/configure --enable-languages=c --with-gnu-as --with-as=/usr/local/binutils-2.16.1/x86-SunOS-gcc-4.0.1/bin/as --with-gnu-ld --with-ld=/usr/local/binutils-2.16.1/x86-SunOS-gcc-4.0.1/bin/ld --prefix=/usr/local/gcc-4.0.2/x86-SunOS-gnu-as-ld Thread model: posix gcc version 4.0.2 % % gcc -O0 -o foo foo.c % foo z= 1 % % gcc -O2 -o foo foo.c % foo z= 1 % % % gcc-4.1 -v Using built-in specs. Target: i386-pc-solaris2.9 Configured with: /home/kate/gcc-4.1-20060203/src/gcc-4.1-20060203/configure --enable-languages=c --with-gnu-as --with-as=/usr/local/binutils-2.16.1/x86-SunOS-gcc-4.0.1/bin/as --with-gnu-ld --with-ld=/usr/local/binutils-2.16.1/x86-SunOS-gcc-4.0.1/bin/ld --prefix=/home/kate/gcc-4.1-20060203/x86-SunOS-gnu-as-ld Thread model: posix gcc version 4.1.0 20060203 (prerelease) % % % gcc-4.1 -O0 -o foo foo.c z = 1 % % gcc-4.1 -O2 -o foo foo.c z = -1 % */ #include int bar(x, y) int x, y; { int x1, y1; int x2, y2; unsigned int x3, y3, w; int z; x1 = (x < (1 << 30)); y1 = (y < (1 << 30)); if (x1 && y1) { x2 = ((x > 0)? (x): -(x)); y2 = ((y > 0)? (y): -(y)); x3 = x2; y3 = y2; w = x3 * y3; if (w >= (1 << 30)) { z = 1; } else { z = -1; } } return z; } int main() { int x, y, z; x = 536870912; /* 2^29 */ y = 2; z = bar(x, y); printf("z= %d\n", z); } -- Summary: optimization regression on x86-SunOS Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: regression AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kminola at eng dot umd dot edu GCC build triplet: i386-pc-solaris2.9 GCC host triplet: i386-pc-solaris2.9 GCC target triplet: i386-pc-solaris2.9 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26180