------- Comment #16 from tg at mirbsd dot org 2007-01-25 14:28 ------- Interestingly enough, nbd of OpenWrt has found that the bug doesn't appear (i.e. the assert is triggered) if the function is inlined (at -O3, with -finline-functions, or the attribute).
I've used a simpler test programme while trying to look at it myself: [EMAIL PROTECTED]:~ $ cat x.i int foo(int a) { return (((a + 100) > a) ? 0 : 1); } int main(void) { return (foo(0x7fffffff)); } If that one returns 0, bug, if 1, correct. I suppose this is not a problem in fold-const.c but in some other code "optimisation". We'd really appreciate if someone can help with this. -- tg at mirbsd dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |3.4.6 Known to work| |4.1.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30477