This is the mail archive of the gcc-bugs@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]

Re: assignment problem with doubles: getting -NaN unexpectedly



Ah, I just noticed that Karl Ostner posted:

>There are two scenarios which are reproducing this problem.
>I did some code changes which did not help:
>1. add -O or -O0, did not work
>2. add register to the definition of the local variable:
>   this solves the first scenario (!) but the second fails
>3. add -mno-fp-ret-in-387 compiler switch, and compile the
>   relevant file only.
>   this solves the second scenario, but the first fails
>4. add -mno-fp-ret-in-387 compiler switch, and compile all
>   files of my lib this files belongs to:
>   both scenarios fail !
>5. substitute assignment by a memcpy()
>   This helps directly for this function, but the problem
>   occurs in the next assignment of a double value.
>6. add -ffloat-store compiler switch, does not help

....so -ffloat-store appears to temporarily get things going for my test case 
but is not an actual fix for the bug.

Drat.

Monty



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