public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "simonb at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/51727] Changing module files
Date: Mon, 08 Oct 2012 09:33:00 -0000	[thread overview]
Message-ID: <bug-51727-4-aQO261wGS1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51727-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51727

--- Comment #9 from Simon Baldwin <simonb at google dot com> 2012-10-08 09:32:55 UTC ---
(In reply to comment #1)
> Also reported here:
> 
> http://gcc.gnu.org/ml/gcc/2012-10/msg00075.html

To add a little more detail, here is one diff seen between two .mod files:

$ diff omp_lib.mod.first omp_lib.mod
2c2
< MD5:39fa3d71e0f92c936ff97e590e8d74cf -- If you edit this, you'll get what you
deserve.
---
> MD5:893e632666abe58013fd14806b18696f -- If you edit this, you'll get what you deserve.
174,175d173
< 20 'lock' '' '' 19 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN UNKNOWN 0 0
< DUMMY) (INTEGER 4 0 0 0 INTEGER ()) 0 0 () () 0 () () () 0 0)
177a176,177
> 20 'lock' '' '' 19 ((VARIABLE INOUT UNKNOWN-PROC UNKNOWN UNKNOWN 0 0
> DUMMY) (INTEGER 4 0 0 0 INTEGER ()) 0 0 () () 0 () () () 0 0)

This is an ordering difference in the output of write_symbol1, which traverses
a pointer tree whose compare function compares pointers with greaterthan and
lessthan.  The tree is augmented during traversal, so there are repeated calls
to write_symbol1 along with a 'written' marker at each node.  Ordering by
integer 'tag' assigned to each pointer may be problematic because new tags are
assigned during traversals, meaning that the sequence in which tags arrive is
itself partially a function of the pointer ordering.


> I'm wondering if a very naive hack like sorting .mod content (like in cat
> old.mod 1 | sort -s > new.mod) could not paper over this problem sufficiently
> well to make it irrelevant in reality.

Perhaps, but it would have to be less naive than this in practice.  A .mod file
is structured into sections that a simple sort could fragment.  It also
contains an MD5 checksum of its contents, but I'm not sure how important this
is.  If it's not critical, removing it might be an acceptable price to pay for
simpler code elsewhere.


  parent reply	other threads:[~2012-10-08  9:33 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02  0:20 [Bug fortran/51727] New: " mikael at gcc dot gnu.org
2012-10-05 18:16 ` [Bug fortran/51727] " Joost.VandeVondele at mat dot ethz.ch
2012-10-05 19:35 ` tobi at gcc dot gnu.org
2012-10-06 11:41 ` tobi at gcc dot gnu.org
2012-10-06 12:42 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-06 12:46 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-06 12:47 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-06 12:48 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-06 12:52 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-08  9:33 ` simonb at google dot com [this message]
2012-10-10  9:11 ` tobi at gcc dot gnu.org
2012-10-10  9:48 ` tobi at gcc dot gnu.org
2012-10-11 12:37 ` tobi at gcc dot gnu.org
2012-10-11 13:03 ` tobi at gcc dot gnu.org
2012-10-11 13:30 ` tobi at gcc dot gnu.org
2012-10-11 14:02 ` tobi at gcc dot gnu.org
2012-10-13  8:08 ` simonb at google dot com
2012-10-13  8:09 ` aaw at gcc dot gnu.org
2012-10-13  8:13 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-13  8:31 ` tobi at gcc dot gnu.org
2012-10-13  9:26 ` simonb at google dot com
2012-10-13  9:32 ` tobi at gcc dot gnu.org
2012-10-13 11:30 ` tobi at gcc dot gnu.org
2012-10-13 12:28 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-13 12:45 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-15 14:14 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-28 11:11 ` Joost.VandeVondele at mat dot ethz.ch
2012-10-28 11:15 ` tobi at gcc dot gnu.org
2012-11-08 15:46 ` tobi at gcc dot gnu.org
2012-11-08 22:22 ` tobi at gcc dot gnu.org
2012-11-09  7:31 ` Joost.VandeVondele at mat dot ethz.ch
2012-11-09  9:44 ` tobi at gcc dot gnu.org
2012-11-09 10:05 ` Joost.VandeVondele at mat dot ethz.ch
2012-11-29  7:31 ` Joost.VandeVondele at mat dot ethz.ch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-51727-4-aQO261wGS1@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).