This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/30364] [4.1/4.2/4.3 Regression] Wrong variable ranges due to constant folding



------- Comment #4 from guillaume dot melquiond at ens-lyon dot fr  2007-01-04 11:25 -------
Just for the sake of completeness. Wrong code is also generated when addition
and multiplication are mixed, because of distributivity:

int f(int a)
{
  if (a > 0x7FFFFFF0) return 0;
  int b = (a - 20) * 2;
  return b > 0x7FFFFFF0;
}


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]