Bug 96979 - Internal error when overshifting integers
Summary: Internal error when overshifting integers
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: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-07 18:04 UTC by Szymon Acedanski
Modified: 2007-04-18 16:54 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-06-07 19:35:22 UTC
Embargoed:


Attachments (Terms of Use)
My project, with offending file 'dir.c' (14.19 KB, application/x-tgz)
2003-06-07 18:06 UTC, Szymon Acedanski
no flags Details
dir.c after preprocessing (313.47 KB, text/x-csrc)
2003-06-07 18:07 UTC, Szymon Acedanski
no flags Details

Description Szymon Acedanski 2003-06-07 18:04:49 UTC
From Bugzilla Helper: 
User-Agent: Mozilla/5.0 (compatible; Konqueror/3; Linux) 
 
Description of problem: 
I tried to compile my own kernel module and I got 
 
dir.c:108: Internal compiler error in extract_insn, at recog.c:2148 
Please submit a full bug report, 
with preprocessed source if appropriate. 
 
[full log attached] 
 
I realized my error in source code, which stated 
 
[...] i << PAGE_CACHE_SIZE [...] 
 
where 'i' is unsigned long, and PAGE_CACHE_SIZE is #defined as 0x400. I should 
have written 'i << PAGE_CACHE_SHIFT'. 
 
Version-Release number of selected component (if applicable): 
gcc-3.2-7 
 
How reproducible: 
Always 
 
Steps to Reproduce: 
1. Just try to compile preprocessed file 'gcc-bug-source.i' with 'gcc -c 
gcc-bug-source.i'. 
2. You may also try compiling 'dir.c' according to makefile (archive 
attached). 
 
Actual Results: 
dir.c: In function `netfs_readdir': 
dir.c:103: warning: left shift count >= width of type 
dir.c:108: unrecognizable insn: 
(insn 362 360 364 (set (reg:QI 108) 
        (const_int 4096 [0x1000])) -1 (nil) 
    (nil)) 
dir.c:108: Internal compiler error in extract_insn, at recog.c:2148 
 
 
Expected Results: 
1. to print a warning, but to continue compilation (extra shifting could 
produce 0 by "overshifting" all bits). 
2. or just boil out with error message (but not such an error :) 
 
Additional info: 
 
offending line (preprocessed): 
 
fp->f_pos = (i << (1UL << 12)) | offset;

Comment 1 Szymon Acedanski 2003-06-07 18:06:21 UTC
Created attachment 92240 [details]
My project, with offending file 'dir.c'

Comment 2 Szymon Acedanski 2003-06-07 18:07:27 UTC
Created attachment 92241 [details]
dir.c after preprocessing

Comment 3 Jakub Jelinek 2003-06-07 19:35:22 UTC
Cannot reproduce with gcc-3.2.2-5 (RHL9) or gcc-3.3-5 (rawhide).


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