public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/61045] New: Wrong constant folding
@ 2014-05-03 15:41 ishiura-compiler at ml dot kwansei.ac.jp
  2014-05-03 15:57 ` [Bug tree-optimization/61045] " mpolacek at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: ishiura-compiler at ml dot kwansei.ac.jp @ 2014-05-03 15:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61045
           Summary: Wrong constant folding
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ishiura-compiler at ml dot kwansei.ac.jp

GCC 4.4.7 - 4.10.0 for x86_64 miscompiles the following code.

   $ cat test.c

   int main (void)
   {
      long a = 0;
      long b = 0x7FFFFFFFFFFFFFFFL;
      int t = (a - 2) > (b - 1);
      if (t != 0) { __builtin_abort(); };
      return 0;
   }

   $ x86_64-unknown-linux-gnu-gcc-4.10.0 test.c -O2
   $ ./a.out 
   Aborted (core dumped)

   $ x86_64-unknown-linux-gnu-gcc-4.10.0 -v        
   Using built-in specs.
   COLLECT_GCC=x86_64-unknown-linux-gnu-gcc-4.10.0
  
COLLECT_LTO_WRAPPER=/usr/local/x86_64-tools/gcc-4.10.0/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
   Target: x86_64-unknown-linux-gnu
   Configured with: /home/hassy/gcc/configure
   --prefix=/usr/local/x86_64-tools/gcc-4.10.0/
   --with-gmp=/usr/local/gmp-5.1.1/ --with-mpfr=/usr/local/mpfr-3.1.2/
   --with-mpc=/usr/local/mpc-1.0.1/ --disable-multilib
   --disable-nls --enable-languages=c
   Thread model: posix
   gcc version 4.10.0 20140502 (experimental) (GCC)


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

end of thread, other threads:[~2014-09-09 13:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-03 15:41 [Bug tree-optimization/61045] New: Wrong constant folding ishiura-compiler at ml dot kwansei.ac.jp
2014-05-03 15:57 ` [Bug tree-optimization/61045] " mpolacek at gcc dot gnu.org
2014-05-03 15:59 ` [Bug middle-end/61045] [4.7/4.8/4.9/4.10 Regression] " mpolacek at gcc dot gnu.org
2014-05-03 16:00 ` mikpelinux at gmail dot com
2014-05-03 17:02 ` mpolacek at gcc dot gnu.org
2014-05-03 19:31 ` mikpelinux at gmail dot com
2014-05-05  9:11 ` rguenth at gcc dot gnu.org
2014-05-28 11:10 ` rguenth at gcc dot gnu.org
2014-05-28 12:44 ` rguenth at gcc dot gnu.org
2014-05-28 12:47 ` rguenth at gcc dot gnu.org
2014-06-12 13:44 ` [Bug middle-end/61045] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-09-09 13:18 ` [Bug middle-end/61045] [4.8 " rguenth at gcc dot gnu.org
2014-09-09 13:19 ` 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).