Bug 112510 - Internal compiler error in extract_insn, at recog.c:2148
Summary: Internal compiler error in extract_insn, at recog.c:2148
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 8.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-21 22:20 UTC by Need Real Name
Modified: 2007-04-18 17:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-12-22 10:43:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2003-12-21 22:20:21 UTC
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:

Comment 1 Jakub Jelinek 2003-12-22 10:43:14 UTC
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.

Comment 2 Need Real Name 2003-12-22 20:41:43 UTC
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.

Comment 3 Jakub Jelinek 2003-12-22 21:11:20 UTC
Wanted to say this is FIXED in newer GCC rpms.


Note You need to log in before you can comment on or make changes to this bug.