From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8807 invoked by alias); 13 Aug 2008 03:46:41 -0000 Received: (qmail 8628 invoked by uid 48); 13 Aug 2008 03:45:21 -0000 Date: Wed, 13 Aug 2008 03:46:00 -0000 Subject: [Bug c/37102] New: possible integer codegen bug X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "regehr at cs dot utah dot edu" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00966.txt.bz2 This is for svn 139046 on Ubuntu Hardy. regehr@john-home:~/volatile/tmp0$ current-gcc -O -Wall -fwrapv small.c -o small regehr@john-home:~/volatile/tmp0$ ./small 5 regehr@john-home:~/volatile/tmp0$ current-gcc -O3 -Wall -fwrapv small.c -o small regehr@john-home:~/volatile/tmp0$ ./small 0 regehr@john-home:~/volatile/tmp0$ current-gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr Thread model: posix gcc version 4.4.0 20080813 (experimental) (GCC) regehr@john-home:~/volatile/tmp0$ cat small.c #include unsigned int g_24; unsigned int g_37 = 1; unsigned char g_225; int main (void) { int l_289; for (l_289 = 1; l_289 < 5; l_289 += 1) { if (g_225) { g_24 = g_37; } } g_24 = g_37; unsigned short context = g_24 << 1; do { if (context) context = (context << 1) ^ 1; } while (0); printf ("%d\n", (int)context); return 0; } -- Summary: possible integer codegen bug Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: regehr at cs dot utah dot edu GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37102