On 03/10/2018 06:58 AM, Milan Ton wrote:

run-time tests and visual inspection suggest that both variants of the
compiled function are correct. I looked at the output of the switch
`-fdump-tree-all' and realized that the path `ivopts' makes this difference.
Once `-fno-ivopts' applied, the two compilations are binary equivalent.

Shouldn't I expect in general same output of such cross compilers ?
What could be reasons of such differences ? and options to fix it ?

Yes, that's a reasonable expectation. The usually discovered cause of such differences is the host system's qsort function coupled with a comparison function that can return 0. When that happens things can be differently ordered, essentially at the whim of the host. And that can affet code generation. It sounds like you've tied that down to ivops -- great!

If you could find a selfcontained testcase, that'd make a great bug report. (Sadly, 'ivopts can cause code differences' is probably too vague.)


nathan

--
Nathan Sidwell

Reply via email to