[Bug c/37103] possible integer codegen bug

pinskia at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Aug 13 05:46:00 GMT 2008



------- Comment #1 from pinskia at gmail dot com  2008-08-13 05:44 -------
Subject: Re:   New: possible integer codegen bug

Note for most targets not printing is correct as char is signed by  
default but for most powerpc targets the opposite is true. You should  
have explicted included signed for g_99.

Sent from my iPhone

On Aug 12, 2008, at 22:10, "regehr at cs dot utah dot edu"
<gcc-bugzilla@gcc.gnu.org 
 > wrote:

> 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
>


-- 


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



More information about the Gcc-bugs mailing list