[Aldor-l] Bigint bug(!)
Gabriel Dos Reis
gdr at cs.tamu.edu
Sat Aug 16 16:55:38 EDT 2008
pip88nl at gmail.com writes:
| On Sat, Aug 16, 2008 at 12:49:21PM -0400, Stephen Watt wrote:
| > Such a huge list of bugs is very surprising. Which C compiler are you using?
| > It may be as Gaby suggested that more aggressive optimization is
| > changing the behaviour of code when ints wrap around. -- Stephen
|
| I am using gcc 4.1 and glibc 2.3. My guess is indeed the optimisation.
| I'll do some tests with different optimisation settings.
You can experiment by rebuilding everything with -fwrapv (for ALL
invocations of GCC) to see how things turn out.
-fwrapv instructs GCC to assume that signed overflow arithmetic wraps
around. In return you don't benefit from optimzations based on value
range propopation (typically in loops).
-- Gaby
More information about the Aldor-l
mailing list