[gfortran PR32147] Make module files more predictable
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Sun Oct 28 13:38:00 GMT 2007
The PR is concerned with the issue that our module files change more or
less randomly if one changes the sources only slightly. This is because
we build up our symbol trees balancing them randomly, and then traverse
them top-down.
This patch changes the order to always be left-to-right. This is fairly
trivial, and amounts to replacing
{
walk_left ();
walk_right ();
do_something ();
}
with
{
walk_left ();
do_something ();
walk_right ();
}
keeping in mind that do_something() may return early, which made a few
safeguards necessary.
Unfortunately the bug reporter didn't have time to verify that it indeed
fixes his problem, but due to the trivial nature of this patch, I think
it's worthy having anyway. It also gives us cleaner -fdump-parse-tree
output after all! :-)
Built and tested on i386-darwin. Ok?
Cheers,
- Tobi
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr32147.diff.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071028/2894082e/attachment.txt>
More information about the Fortran
mailing list