View Issue Details

IDProjectCategoryView StatusLast Update
0001433EresseaGeneralpublic2008-08-21 12:45
ReporterEnno Assigned ToEnno  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0001433: When compiling with -O3, there is a differnce in the herb-rotting code
Description

During turn 571, there is a change in the amount of times the random number generator gets called during the ifdef HERBS_ROT block in laws.c

Release build:

  • chaos done [674811135]
  • Herbs done [1154043004] Debug build:
  • chaos done [674811135]
  • Herbs done [1700867581]
Additional Information

Optimization flags: -O3 -fno-strict-aliasing or even just -Os This does not happen when compiling with -O0 instead

TagsNo tags attached.
Faction
Game
Report

Activities

Enno

Enno

2008-05-26 08:54

administrator   ~0003509

The key was to use -ffloat-store if I want predictable results from optimized code. Hooray.

See http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/gcc/Optimize-Options.html

Issue History

Date Modified Username Field Change
2008-05-25 00:20 Enno New Issue
2008-05-25 00:20 Enno Status new => assigned
2008-05-25 00:20 Enno Assigned To => Enno
2008-05-25 00:44 Enno Additional Information Updated
2008-05-26 08:54 Enno Status assigned => resolved
2008-05-26 08:54 Enno Fixed in Version => 573
2008-05-26 08:54 Enno Resolution open => fixed
2008-05-26 08:54 Enno Note Added: 0003509
2008-08-21 12:45 Xolgrim Status resolved => closed