Skip to content

Make iteration ordering predictable.

Scott Snyder requested to merge ssnyder/Gaudi:sort-prg-20201219 into master

The order of iteration over a std::unordered_map is undefined, and can and does change between compiler implementations, and between different versions of the same compiler. (In particular, it changes going from gcc8 to gcc10.)

PrecedenceRulesGraph has a few places where it iterates over an unordered_map, and this ordering is visible externally. Add a separate sorting step in those cases so that the ordering will always be the same.

Edited by Scott Snyder

Merge request reports

Loading