public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52943] New: likely wrong code bug
@ 2012-04-12  3:28 regehr at cs dot utah.edu
  2012-04-12  9:24 ` [Bug tree-optimization/52943] [4.7/4.8 Regression] likely wrong code bug caused by predictive commoning rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: regehr at cs dot utah.edu @ 2012-04-12  3:28 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52943
           Summary: likely wrong code bug
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: regehr@cs.utah.edu
                CC: chenyang@cs.utah.edu


[regehr@dyson r23]$ current-gcc -O2 small.c ; ./a.out 
0
[regehr@dyson r23]$ current-gcc -O3 small.c ; ./a.out 
1
[regehr@dyson r23]$ cat small.c
int printf (const char *, ...);
int a[] = { 0, 0, 0, 6 };

int b;
int
main ()
{
    for (;;)
    {
        b = 3;
        for (; b; b -= 1)
            a[b] = a[3] > 1;
        break;
    }
    printf ("%d\n", a[1]);
    return 0;
}


[regehr@dyson r23]$ current-gcc -v
Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r186359-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r186359-install
--program-prefix=r186359- --enable-languages=c,c++
Thread model: posix
gcc version 4.8.0 20120411 (experimental) (GCC)


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

end of thread, other threads:[~2012-04-12 12:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12  3:28 [Bug c/52943] New: likely wrong code bug regehr at cs dot utah.edu
2012-04-12  9:24 ` [Bug tree-optimization/52943] [4.7/4.8 Regression] likely wrong code bug caused by predictive commoning rguenth at gcc dot gnu.org
2012-04-12  9:25 ` rguenth at gcc dot gnu.org
2012-04-12 11:41 ` rguenth at gcc dot gnu.org
2012-04-12 12:52 ` rguenth at gcc dot gnu.org
2012-04-12 12:52 ` rguenth at gcc dot gnu.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).