public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/37125]  New: possible integer codegen bug
@ 2008-08-15  5:50 regehr at cs dot utah dot edu
  2008-08-15 14:34 ` [Bug c/37125] " rguenth at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: regehr at cs dot utah dot edu @ 2008-08-15  5:50 UTC (permalink / raw)
  To: gcc-bugs

This is seen using r139123 on Ubuntu Hardy on ia32.

regehr@john-home:~/volatile/tmp6$ current-gcc -fwrapv -O0 small.c -o small 
regehr@john-home:~/volatile/tmp6$ ./small
regehr@john-home:~/volatile/tmp6$ current-gcc -fwrapv -O1 small.c -o small 
regehr@john-home:~/volatile/tmp6$ ./small
Aborted
regehr@john-home:~/volatile/tmp6$ current-gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --program-prefix=current-
--enable-languages=c,c++ --prefix=/home/regehr
Thread model: posix
gcc version 4.4.0 20080815 (experimental) (GCC) 
regehr@john-home:~/volatile/tmp6$ cat small.c

extern void abort (void);

static inline unsigned long int
mod_rhs(const long int rhs)
{
    if (rhs == 0) return 1;
    return rhs;
}

void func_44 (unsigned int p_45);
void func_44 (unsigned int p_45)
{
  if (!((p_45 * -9) % mod_rhs (-9))) {
    abort();
  }
}

int main (void)
{
  func_44 (2);
  return 0;
}


-- 
           Summary: possible integer codegen bug
           Product: gcc
           Version: 4.4.0
            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=37125


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

end of thread, other threads:[~2008-08-28 14:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-15  5:50 [Bug c/37125] New: possible integer codegen bug regehr at cs dot utah dot edu
2008-08-15 14:34 ` [Bug c/37125] " rguenth at gcc dot gnu dot org
2008-08-15 14:39 ` [Bug middle-end/37125] [4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-08-15 17:22 ` regehr at cs dot utah dot edu
2008-08-18 13:58 ` jsm28 at gcc dot gnu dot org
2008-08-22  0:33 ` cnstar9988 at gmail dot com
2008-08-22  9:02 ` rguenth at gcc dot gnu dot org
2008-08-22  9:29 ` cnstar9988 at gmail dot com
2008-08-22 10:35 ` rguenth at gcc dot gnu dot org
2008-08-22 12:47 ` rguenth at gcc dot gnu dot org
2008-08-28 14:21 ` rguenth at gcc dot gnu dot 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).