Bug 112524 (floorFround)

Summary: Internal compiler error in insn_extract, at insn-extract.c:1749
Product: [Retired] Red Hat Linux Reporter: ohad <nekko>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: low    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-12-22 10:39:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ohad 2003-12-22 08:25:01 UTC
Description of problem:

gcc break with this message, as well as:
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):
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

How reproducible:
---------------------------------------------------------
double fround(a, n)
double a;
double n;
{
        return(floor(n * a + .5000000001 )/n);
}
---------------------------------------------------------

Steps to Reproduce:
1. place above source in c.c
2. gcc c.c
3.
  
Actual results:
% gcc c.c
c.c: In function `fround':
c.c:8: Internal compiler error in insn_extract, at insn-extract.c:1749
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
%

Expected results:


Additional info:

Comment 1 Jakub Jelinek 2003-12-22 10:39:02 UTC
Cannot reproduce it with either of gcc 3.2.2-5, 3.2.3-24 nor 3.3.2-5.
Furthermore, your testcase certainly will not do what you expect,
since you forgot to #include <math.h> to get prototype for floor.
floor returns double, while with implicit declaration you get
int floor ();