------- Comment #3 from bonzini at gnu dot org  2009-04-23 15:22 -------
Created an attachment (id=17684)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17684&action=view)
patch

Bootstrapped but not yet regtested.  Testcase:

/* { dg-do link } */
/* { dg-options "-O2" } */

int main (void)
{
  int exp = -1;
  /* Wrong folding of the LHS to an unsigned MAX leads to 4294967295 > 2.  */
  if (("%u\n", exp < 2 ? 2U : (unsigned int) exp) > 2)
    link_error ();
  return 0;
}


-- 


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

Reply via email to