public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/60930] New: Wrong constant folding
@ 2014-04-23  2:24 ishiura-compiler at ml dot kwansei.ac.jp
  2014-04-23  2:44 ` [Bug tree-optimization/60930] Wrong folding of - ((unsigned long long) a * (unsigned long long) (unsigned int)-1) pinskia at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: ishiura-compiler at ml dot kwansei.ac.jp @ 2014-04-23  2:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60930
           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.7 - 4.10 for i686 and x86_64 miscompiles the following code.

    $ cat error.c

    #include <stdio.h>
    int x = 1;
    main ()
    {
        unsigned long long t = 0xffffffffffffffffLLU * (0xffffffffLU * x);
        if (t != 0xffffffff00000001LLU) {
            printf ("Error (t == %llu)\n", t);
        }
        return 0;
    }

    $ x86_64-unknown-linux-gnu-gcc-4.10.0 error.c -O1
    $ ./a.out
    Error 1

    $ 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-master/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.2/ --disable-multilib
    --disable-nls --enable-languages=c
    Thread model: posix
    gcc version 4.10.0 20140422 (experimental) (GCC)

The status of the other versions are as follows:

    (x86_64)
    GCC-4.7.3 OK
    GCC-4.8.3 (prerelease) Error
    GCC-4.9.1 (prerelease) Error
    GCC-4.10.0 (experimental) Error

    (i686)
    GCC-4.7.3 Error
    GCC-4.8.3 (prerelease) Error
    GCC-4.9.1 (prerelease) Error
    GCC-4.10.0 (experimental) Error


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

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

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-23  2:24 [Bug tree-optimization/60930] New: Wrong constant folding ishiura-compiler at ml dot kwansei.ac.jp
2014-04-23  2:44 ` [Bug tree-optimization/60930] Wrong folding of - ((unsigned long long) a * (unsigned long long) (unsigned int)-1) pinskia at gcc dot gnu.org
2014-04-23  6:55 ` [Bug tree-optimization/60930] [4.8/4.9/4.10 Regression] " jakub at gcc dot gnu.org
2014-04-23  8:39 ` rguenth at gcc dot gnu.org
2014-04-23 12:36 ` wschmidt at gcc dot gnu.org
2014-04-23 21:04 ` wschmidt at gcc dot gnu.org
2014-04-23 21:22 ` jakub at gcc dot gnu.org
2014-04-23 22:10 ` wschmidt at gcc dot gnu.org
2014-04-24  9:16 ` rguenth at gcc dot gnu.org
2014-04-24 14:41 ` wschmidt at gcc dot gnu.org
2014-04-24 15:40 ` wschmidt at gcc dot gnu.org
2014-04-24 16:00 ` wschmidt at gcc dot gnu.org
2014-04-25 14:54 ` wschmidt at gcc dot gnu.org
2014-05-02 21:50 ` wschmidt at gcc dot gnu.org
2014-05-02 21:51 ` wschmidt at gcc dot gnu.org
2014-05-02 21:53 ` wschmidt 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).