[Bug middle-end/35390] New: ~~n != n in some cases

takeshi dot mouri dot net at green dot ocn dot ne dot jp gcc-bugzilla@gcc.gnu.org
Wed Feb 27 11:46:00 GMT 2008


the preprocessed file:
unsigned
foo (int n)
{
  return ~((unsigned)~n);
}

The above code is compiled to:
;; Function foo (foo)
;; enabled by -tree-original


{
  return (unsigned int) ~n;
}

This should be "return (unsigned int) n".


-- 
           Summary: ~~n != n in some cases
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: takeshi dot mouri dot net at green dot ocn dot ne dot jp
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


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



More information about the Gcc-bugs mailing list