perl at aaroncrane.co.uk
Sat Jul 31 11:20:23 PDT 2010
Miles Gould <miles at assyrian.org.uk> wrote:
> What's /actually/ happening, it turns out, is that the test fails when
> compiled with -O0 or -O1, and passes with -O2 or above.
Here's a random guess: there's a compiler bug which is present at all
optimisation levels, but happens to be hidden by an optimisation
enabled at -O2 — perhaps an IR structure that's mishandled is only
ever present at -O1 or -O0, because -O2 changes the underlying code to
something else first. Or (less likely, I suspect) the unoptimised
code tickles a CPU bug in the same sort of way.
Can the individual optimisations in -O2 compared to -O1 be enabled
selectively? If so, you could try bisecting the list of optimisations
to find the one which magically makes the test pass. And if you're
unlucky, it'll be some *set* of individual optimisations.
I don't envy you tracking that down. :-(
Aaron Crane ** http://aaroncrane.co.uk/
More information about the Edinburgh-pm