This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

IA64 GCC bootstrap problem


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);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]