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 optimization/14669] [3.4/3.5 Regression] Wrong code with -O for enum values expression E4 <= t && t <= E6


------- Additional Comments From kazu at cs dot umass dot edu  2004-03-21 22:21 -------
Reduced to:

extern "C" {
void abort (void) __attribute__((__noreturn__));
void exit (int) __attribute__((__noreturn__));
}

enum ActionType { EE =-1, E0 = 0, E1, E2 };

int
main (void)
{
  ActionType t = E0;

  if (E1 <= t && t <= E2)
    abort ();

  exit (0);
}


-- 


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


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