re PR c++/5624 (Strange bug with preprocessed file containing structs)
authorRichard Henderson <rth@gcc.gnu.org>
Mon, 11 Feb 2002 02:12:41 +0000 (18:12 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 11 Feb 2002 02:12:41 +0000 (18:12 -0800)
        PR c++/5624
        * tree.c (append_random_chars): Don't abort if main_input_filename
        does not exist.

From-SVN: r49662

gcc/ChangeLog
gcc/tree.c

index d9d466a9f289e86c7c5e2269745c03a4d56f1611..35a872893bb8fc2cb20bda0765e29be423a110b1 100644 (file)
@@ -1,11 +1,16 @@
+2002-02-10  Richard Henderson  <rth@redhat.com>
+
+       PR c++/5624
+       * tree.c (append_random_chars): Don't abort if main_input_filename
+       does not exist.
+
 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
 
        * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): Disable.
 
 2002-02-10  Kazu Hirata  <kazu@hxi.com>
 
-       * config/h8300/h8300.md (pushhi1_h8300): Correct the mode
-       used.
+       * config/h8300/h8300.md (pushhi1_h8300): Correct the mode used.
        (pushhi1): Likewise.
 
 2002-02-10  John David Anglin  <dave@hiauly1.hia.nrc.ca>
index d664866301d9f69243957b20d51698c9105ea76d..e2829491ca40eafe911de7b1c0a21e1bbbc42c54 100644 (file)
@@ -4491,16 +4491,23 @@ append_random_chars (template)
         compiles since this can cause bootstrap comparison errors.  */
 
       if (stat (main_input_filename, &st) < 0)
-       abort ();
-
-      /* In VMS, ino is an array, so we have to use both values.  We
-        conditionalize that.  */
+       {
+         /* This can happen when preprocessed text is shipped between
+            machines, e.g. with bug reports.  Assume that uniqueness
+            isn't actually an issue.  */
+         value = 1;
+       }
+      else
+       {
+         /* In VMS, ino is an array, so we have to use both values.  We
+            conditionalize that.  */
 #ifdef VMS
 #define INO_TO_INT(INO) ((int) (INO)[1] << 16 ^ (int) (INO)[2])
 #else
 #define INO_TO_INT(INO) INO
 #endif
-      value = st.st_dev ^ INO_TO_INT (st.st_ino) ^ st.st_mtime;
+         value = st.st_dev ^ INO_TO_INT (st.st_ino) ^ st.st_mtime;
+       }
     }
 
   template += strlen (template);