From 65739e62e4c32be813d518e943249b2c9a3512e3 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 10 Feb 2002 18:12:41 -0800 Subject: [PATCH] re PR c++/5624 (Strange bug with preprocessed file containing structs) PR c++/5624 * tree.c (append_random_chars): Don't abort if main_input_filename does not exist. From-SVN: r49662 --- gcc/ChangeLog | 9 +++++++-- gcc/tree.c | 17 ++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9d466a9f28..35a872893bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,11 +1,16 @@ +2002-02-10 Richard Henderson + + PR c++/5624 + * tree.c (append_random_chars): Don't abort if main_input_filename + does not exist. + 2002-02-10 Hans-Peter Nilsson * config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): Disable. 2002-02-10 Kazu Hirata - * 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 diff --git a/gcc/tree.c b/gcc/tree.c index d664866301d..e2829491ca4 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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); -- 2.30.2