public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/37103]  New: possible integer codegen bug
@ 2008-08-13  5:11 regehr at cs dot utah dot edu
  2008-08-13  5:44 ` Andrew Thomas Pinski
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: regehr at cs dot utah dot edu @ 2008-08-13  5:11 UTC (permalink / raw)
  To: gcc-bugs

This is an interesting one...

Compiling the code below at all common optimization levels, gcc r139046
generates code that prints hello, as does 4.3.1.  Pre-4.3 versions of gcc emit
code that prints nothing.  I'm pretty sure that the older versions are correct.

#include <stdio.h>

int func_72 (void);
int func_72 (void)
{
  printf ("hello\n");
  return 0;
}

void func_58 (unsigned short p_65);
void func_58 (unsigned short p_65)
{
  char g_99 = -1;
  (p_65 != g_99) || (func_72 ());
}

int main (void)
{
  func_58 (-1);
  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=37103


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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-13  5:11 [Bug c/37103] New: possible integer codegen bug regehr at cs dot utah dot edu
2008-08-13  5:44 ` Andrew Thomas Pinski
2008-08-13  5:46 ` [Bug c/37103] " pinskia at gmail dot com
2008-08-13  9:17 ` [Bug middle-end/37103] [4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-08-13 13:38 ` jakub at gcc dot gnu dot org
2008-08-13 18:31 ` jakub at gcc dot gnu dot org
2008-08-13 21:06 ` rguenther at suse dot de
2008-08-13 22:53 ` regehr at cs dot utah dot edu
2008-08-13 22:58 ` regehr at cs dot utah dot edu
2008-08-14  9:05 ` jakub at gcc dot gnu dot org
2008-08-14  9:13 ` jakub at gcc dot gnu dot org
2008-08-14  9:22 ` jakub 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).