public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/59101] New: integer wrong code bug
@ 2013-11-13  5:59 regehr at cs dot utah.edu
  2013-11-13  9:09 ` [Bug target/59101] [4.7/4.8/4.9 Regression] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: regehr at cs dot utah.edu @ 2013-11-13  5:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59101
           Summary: integer wrong code bug
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: regehr at cs dot utah.edu

$ gcc -O0 foo.c ; ./a.out 
7
$ gcc -O1 foo.c ; ./a.out 
6
$ cat foo.c
int printf(const char *, ...);
int a, b;

int main() {
  b = (~a & 4102790424) > 0 | 6;
  printf("%d\n", b);
  return 0;
}

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/regehr/z/compiler-install/gcc-r204695-install/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/regehr/z/compiler-source/gcc/configure
--prefix=/home/regehr/z/compiler-install/gcc-r204695-install
--enable-languages=c,c++ --enable-multilib
Thread model: posix
gcc version 4.9.0 20131112 (experimental) (GCC)


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

end of thread, other threads:[~2014-05-07 16:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13  5:59 [Bug c/59101] New: integer wrong code bug regehr at cs dot utah.edu
2013-11-13  9:09 ` [Bug target/59101] [4.7/4.8/4.9 Regression] " jakub at gcc dot gnu.org
2013-11-13  9:31 ` jakub at gcc dot gnu.org
2013-11-14  8:14 ` jakub at gcc dot gnu.org
2013-11-19 15:09 ` [Bug target/59101] [4.7 " rguenth at gcc dot gnu.org
2014-05-07 16:07 ` jakub at gcc dot gnu.org
2014-05-07 16:21 ` jakub 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).