Bug 191963 - ICE related to unsigned int with high bit set and floor()
ICE related to unsigned int with high bit set and floor()
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-16 12:14 EDT by Matt Davey
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: gcc-4.1.0-15.fc5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-17 05:03:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Example code that triggers internal compiler error (141 bytes, text/plain)
2006-05-16 12:14 EDT, Matt Davey
no flags Details

  None (edit)
Description Matt Davey 2006-05-16 12:14:29 EDT
Description of problem:
GCC internal compiler error

Version-Release number of selected component (if applicable):
gcc-4.1.0-3
glibc-headers-2.4-4

How reproducible:
completely

Steps to Reproduce:
1. save attached code to foo.c
2. compile with "gcc -O2 -c foo.c" on a 32-bit platform
  
Actual results:
Failure to produce .o file.  Instead, error report:
/tmp/foo.c: In function 'main':
/tmp/foo.c:9: internal compiler error: in get_callee_fndecl, at tree.c:5846

Expected results:
production of object file.

Additional info:
This bug is dependent on several things:
1. If optimisation is turned off, the bug disappears.
2. The bug occurs if (and only if) the (unsigned) integer constant
   has its high bit set.
3. If the call to 'floor' is replaced with a call to foo, with
   prototype "double foo(double d);", the bug disappears.  Perhaps
   the bug is related to some internal floor() implementation.
Comment 1 Matt Davey 2006-05-16 12:14:29 EDT
Created attachment 129220 [details]
Example code that triggers internal compiler error
Comment 2 Matt Davey 2006-05-16 12:18:26 EDT
Comment on attachment 129220 [details]
Example code that triggers internal compiler error

#include<math.h>

int main(int argc, char **argv)
{
	double d;
	unsigned int i = 0x80000000;

	d = i;
	i = (unsigned int)floor(d);
	return i;
}
Comment 3 Jakub Jelinek 2006-05-17 05:03:47 EDT
This is fixed in gcc-4.1.0-15.fc5 (currently FC5 testing updates).

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