From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Description of problem: Compile this guy: int bug () { unsigned int ones = 0x7fffffff; int i,j; return(ones>>129); } And get: gcc bug.c bug.c: In function `bug': bug.c:4: warning: right shift count >= width of type bug.c:5: unrecognizable insn: (insn 15 9 17 (set (reg:QI 60) (const_int 129 [0x81])) -1 (nil) (nil)) bug.c:5: Internal compiler error in extract_insn, at recog.c:2148 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. Version-Release number of selected component (if applicable): Version : 3.2 Vendor: Red Hat, Inc. How reproducible: Always Steps to Reproduce: 1.see above 2. 3. Expected Results: not to bugger up Additional info:
This is verified in newer GCC rpms, verified in GCC 3.2.2-5, 3.2.3-24 and 3.3.2-5. But, your testcase invokes undefined behaviour anyway.
I understand that the runtime behaviour is undefined. It doesn't mean that it's acceptable for the compiler to be to stupid to compile it.
Wanted to say this is FIXED in newer GCC rpms.