------- Additional Comments From tausq at debian dot org 2005-08-13 03:08 ------- The line of code in question is:
51 if (old == SIG_IGN || old == SIG_DFL || old == SIG_ERR) after preprocessing, this becomes if (old == ((__sighandler_t) 1) || old == ((__sighandler_t) 0) || old == ((__sighandler_t) -1)) It appears gcc optimized out the the old == 0 case, and it does the right thing for the old == 1 case. For the old == -1 case, it seems to subtract 2 from old, and converts -1 to -4. Weird. This also happens with -O1. Dave says it looks like the initial rtl generation is wrong, so maybe this is not an optimization bug. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23369