public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/42512]  New: possible integer wrong code bug
@ 2009-12-26 19:27 regehr at cs dot utah dot edu
  2009-12-26 20:00 ` [Bug middle-end/42512] [4.5 Regression] integer wrong code bug with loop jakub at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 16+ messages in thread
From: regehr at cs dot utah dot edu @ 2009-12-26 19:27 UTC (permalink / raw)
  To: gcc-bugs

regehr@john-home:~$ current-gcc -v
Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/home/regehr/z/tmp/gcc-r155465-install/libexec/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/tmp/gcc-r155465-install --program-prefix=r155465-
--enable-languages=c,c++
Thread model: posix
gcc version 4.5.0 20091225 (experimental) (GCC) 
regehr@john-home:~$ current-gcc -O2 small.c -o small
regehr@john-home:~$ ./small
g_3 = -1
regehr@john-home:~$ current-gcc -O3 small.c -o small
regehr@john-home:~$ ./small
g_3 = 255
regehr@john-home:~$ cat small.c
#include <stdio.h>

int g_3;

int main (void)
{
    long long l_2;
    for (l_2 = -1; l_2 != 0; l_2 = (unsigned char)(l_2 - 1))
    {
        g_3 |= l_2;
    }
    printf("g_3 = %d\n", g_3);
    return 0;
}


-- 
           Summary: possible integer wrong code bug
           Product: gcc
           Version: unknown
            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=42512


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-10-25 11:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-42512-4@http.gcc.gnu.org/bugzilla/>
2022-10-25 11:40 ` [Bug middle-end/42512] [4.5 Regression] integer wrong code bug with loop cvs-commit at gcc dot gnu.org
2009-12-26 19:27 [Bug c/42512] New: possible integer wrong code bug regehr at cs dot utah dot edu
2009-12-26 20:00 ` [Bug middle-end/42512] [4.5 Regression] integer wrong code bug with loop jakub at gcc dot gnu dot org
2009-12-26 22:13 ` hjl dot tools at gmail dot com
2009-12-26 22:16 ` hjl dot tools at gmail dot com
2009-12-27 14:43 ` ebotcazou at gcc dot gnu dot org
2010-01-08 14:07 ` rguenth at gcc dot gnu dot org
2010-01-08 15:00 ` rguenth at gcc dot gnu dot org
2010-01-08 16:20 ` spop at gcc dot gnu dot org
2010-01-08 16:53 ` rguenth at gcc dot gnu dot org
2010-01-08 17:07 ` rguenth at gcc dot gnu dot org
2010-01-08 17:21 ` rguenth at gcc dot gnu dot org
2010-01-08 17:55   ` Sebastian Pop
2010-01-08 17:55 ` sebpop at gmail dot com
2010-01-09 12:04 ` rguenth at gcc dot gnu dot org
2010-01-09 12:04 ` rguenth at gcc dot gnu dot org
2010-02-07  4:49 ` hjl at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).