This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
IA64 GCC bootstrap problem
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: ahs3 at fc dot hp dot com, gcc at gcc dot gnu dot org, pinskia at physics dot uc dot edu,schwab at suse dot de, wilson at specifixinc dot com
- Date: Wed, 3 Mar 2004 14:38:53 -0800 (PST)
- Subject: IA64 GCC bootstrap problem
- Reply-to: sje at cup dot hp dot com
I have created a (very) small example of where GCC is going wrong in the
IA64 bootstrap though I am not sure what to do with it.
As Jim said, the problem is in allocno_compare, I looked into what
numbers wind up giving different results and was then able to come up
with the following small example. Running this little test case I get 8
when I don't do inlining of floating point division and 7 when I do.
I don't know if this is a 'real' bug or just expected floating point
fuzzyness and I am not sure what to do about allocno_compare to deal
with this fuzzyness. My best idea would be to add 0.5 to the double
precision result before converting it back to an int?
Does that sound acceptable?
Steve Ellcey
sje@cup.hp.com
--------------------------
volatile int i = 24;
volatile int j = 30;
int main()
{
int pri2 = (((double) i / j) * 10.0);
printf("%d\n",pri2);
}