public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44828]  New: possible integer wrong code bug
@ 2010-07-05 22:52 regehr at cs dot utah dot edu
  2010-07-06  9:25 ` [Bug c/44828] " jakub at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: regehr at cs dot utah dot edu @ 2010-07-05 22:52 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/compiler-install/gcc-r161813-install/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r161813-install
--program-prefix=r161813- --enable-languages=c,c++
Thread model: posix
gcc version 4.6.0 20100704 (experimental) (GCC) 

regehr@john-home:~$ current-gcc -O1 small.c -o small
regehr@john-home:~$ ./small
checksum g_40 = 274686410
regehr@john-home:~$ current-gcc -O2 small.c -o small
regehr@john-home:~$ ./small
checksum g_40 = -1

regehr@john-home:~$ cat small.c

extern int printf (__const char *__restrict __format, ...);

static char
foo (char si1, char si2)
{
  return si1* si2;
}

 const  volatile unsigned int g_2[8][3] = {{0L, 0L, 0L}, {0L, 0L, 0L}, {0L,
0L, 0L}, {0L, 0L, 0L}, {0L, 0L, 0L}, {0L, 0L, 0L}, {0L, 0L, 0L}, {0L, 0L,
0L}};
long long g_29 = 1;
int g_40 = 0x105F61CAL;
int *g_39 = &g_40;
 volatile int * volatile g_88[1] = {0};
 volatile int g_429[5] = {1L, 1L, 1L, 1L, 1L};

int  main(void)
{
    int * const l_353 = &g_40;
    int l_414 = 0xF5B296C2L;
    if (!(g_2[5][2]))
    {
        int l_420 = 0x0332F5C8L;
        if (((foo (l_420, (*l_353))) > (!-10L)))
        {
            for (l_414 = 0; l_414 < 1; l_414 += 1)
            {
                g_88[l_414] = &g_429[2];
            }
            (*g_39) = -1;
        }
    }
    printf("checksum g_40 = %d\n", g_40);
    return g_29;
}


-- 
           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=44828


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

end of thread, other threads:[~2010-07-27 11:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-05 22:52 [Bug c/44828] New: possible integer wrong code bug regehr at cs dot utah dot edu
2010-07-06  9:25 ` [Bug c/44828] " jakub at gcc dot gnu dot org
2010-07-06  9:33 ` jakub at gcc dot gnu dot org
2010-07-06 10:35 ` rguenth at gcc dot gnu dot org
2010-07-06 13:38 ` rguenth at gcc dot gnu dot org
2010-07-06 13:41 ` [Bug c/44828] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
2010-07-06 14:11 ` regehr at cs dot utah dot edu
2010-07-07 22:52 ` bergner at gcc dot gnu dot org
2010-07-08  4:12 ` bergner at gcc dot gnu dot org
2010-07-08  4:19 ` bergner at gcc dot gnu dot org
2010-07-08  7:47 ` jakub at gcc dot gnu dot org
2010-07-08 11:57 ` [Bug c/44828] [4.3/4.4 " rguenth at gcc dot gnu dot org
2010-07-08 11:57 ` [Bug c/44828] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
2010-07-08 14:18 ` [Bug c/44828] [4.3/4.4 " bergner at gcc dot gnu dot org
2010-07-27 11:24 ` rguenth 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).