http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51727
--- Comment #3 from Tobias Schlüter <tobi at gcc dot gnu.org> 2012-10-06 11:41:23 UTC --- Created attachment 28372 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28372 Candidate patch Here's a patch which fixes one case of module contents not being written in a defined order. I cannot test this right now because of bootstrap failures. There may be other places in the module writing code, where structures aren't traversed in a defined order. 2012-10-06 Tobias Schlüter <t...@gcc.gnu.org> PR fortran/51727 * module.c (write_generic): Traverse tree in left-to-right order.