Bug 96979 - Internal error when overshifting integers
Internal error when overshifting integers
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-07 14:04 EDT by Szymon Acedanski
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-07 15:35:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Szymon Acedanski 2003-06-07 14:04:49 EDT
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 14:06:21 EDT
Created attachment 92240 [details]
My project, with offending file 'dir.c'
Comment 2 Szymon Acedanski 2003-06-07 14:07:27 EDT
Created attachment 92241 [details]
dir.c after preprocessing
Comment 3 Jakub Jelinek 2003-06-07 15:35:22 EDT
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.