On 2002.04.05 00:09 Andy Dougherty wrote:
> 
> I now get the same failure under a default configuration when I use
> the optimizer on pp_sort.c (specifically, -xO2; -xO1 won't trigger it).
> I can't say for sure, but I suspect I tested my Configure patch without
> optimization (because compilation is noticeably faster) and hence was
> fooled.

I'll have to explain the nature of the test which is failing here.

We don't require that quicksort should be unstable. (more precisely,
unstable on the arrays sort.t feeds to it.) The purpose of the
test is to make reasonably sure that a mergesort is not actually used
when a quicksort was requested via 'use sort'.

A real failure would be mergesort or stabilized-qsort becoming unstable:
this would demonstrate that the sort pragma doesn't behave correctly.

I recommend to use John's suggestion : have sort.t to not require instability
even when it's expected. (Just output a diagnostic in case of someone
runs the test without harness, so we'll know that qsort seems to be stable).

> We can turn off optimization for pp_sort.c under the old Sun compiler
> I'm using, but it's a little messy (there's a whole section in 
> hints/README.hints about how to do that sort of thing) and I'd like to
> feel a little more confident that we'd not just be sweeping something
> under the rug.

Reply via email to