public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "regehr at cs dot utah dot edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/44828] New: possible integer wrong code bug Date: Mon, 05 Jul 2010 22:52:00 -0000 [thread overview] Message-ID: <bug-44828-12544@http.gcc.gnu.org/bugzilla/> (raw) regehr@john-home:~$ current-gcc -v Using built-in specs. COLLECT_GCC=current-gcc COLLECT_LTO_WRAPPER=/home/regehr/z/compiler-install/gcc-r161813-install/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../configure --with-libelf=/usr/local --enable-lto --prefix=/home/regehr/z/compiler-install/gcc-r161813-install --program-prefix=r161813- --enable-languages=c,c++ Thread model: posix gcc version 4.6.0 20100704 (experimental) (GCC) regehr@john-home:~$ current-gcc -O1 small.c -o small regehr@john-home:~$ ./small checksum g_40 = 274686410 regehr@john-home:~$ current-gcc -O2 small.c -o small regehr@john-home:~$ ./small checksum g_40 = -1 regehr@john-home:~$ cat small.c extern int printf (__const char *__restrict __format, ...); static char foo (char si1, char si2) { return si1* si2; } const volatile unsigned int g_2[8][3] = {{0L, 0L, 0L}, {0L, 0L, 0L}, {0L, 0L, 0L}, {0L, 0L, 0L}, {0L, 0L, 0L}, {0L, 0L, 0L}, {0L, 0L, 0L}, {0L, 0L, 0L}}; long long g_29 = 1; int g_40 = 0x105F61CAL; int *g_39 = &g_40; volatile int * volatile g_88[1] = {0}; volatile int g_429[5] = {1L, 1L, 1L, 1L, 1L}; int main(void) { int * const l_353 = &g_40; int l_414 = 0xF5B296C2L; if (!(g_2[5][2])) { int l_420 = 0x0332F5C8L; if (((foo (l_420, (*l_353))) > (!-10L))) { for (l_414 = 0; l_414 < 1; l_414 += 1) { g_88[l_414] = &g_429[2]; } (*g_39) = -1; } } printf("checksum g_40 = %d\n", g_40); return g_29; } -- Summary: possible integer wrong code bug Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: regehr at cs dot utah dot edu GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44828
next reply other threads:[~2010-07-05 22:52 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-07-05 22:52 regehr at cs dot utah dot edu [this message] 2010-07-06 9:25 ` [Bug c/44828] " jakub at gcc dot gnu dot org 2010-07-06 9:33 ` jakub at gcc dot gnu dot org 2010-07-06 10:35 ` rguenth at gcc dot gnu dot org 2010-07-06 13:38 ` rguenth at gcc dot gnu dot org 2010-07-06 13:41 ` [Bug c/44828] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org 2010-07-06 14:11 ` regehr at cs dot utah dot edu 2010-07-07 22:52 ` bergner at gcc dot gnu dot org 2010-07-08 4:12 ` bergner at gcc dot gnu dot org 2010-07-08 4:19 ` bergner at gcc dot gnu dot org 2010-07-08 7:47 ` jakub at gcc dot gnu dot org 2010-07-08 11:57 ` [Bug c/44828] [4.3/4.4 " rguenth at gcc dot gnu dot org 2010-07-08 11:57 ` [Bug c/44828] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org 2010-07-08 14:18 ` [Bug c/44828] [4.3/4.4 " bergner at gcc dot gnu dot org 2010-07-27 11:24 ` rguenth at gcc dot gnu dot 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-44828-12544@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).