public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ishiura-compiler at ml dot kwansei.ac.jp" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/60930] New: Wrong constant folding Date: Wed, 23 Apr 2014 02:24:00 -0000 [thread overview] Message-ID: <bug-60930-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2014-04-23 2:24 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-23 2:24 ishiura-compiler at ml dot kwansei.ac.jp [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-60930-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).