From 0b6c426b5d7299bfcf734b84e6885e4b13f74a7b Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 10 Dec 2001 01:28:03 +0000 Subject: [PATCH] tree.c (append_random_char): Conditionalize INO for VMS. * tree.c (append_random_char): Conditionalize INO for VMS. Co-Authored-By: Douglas B Rupp From-SVN: r47827 --- gcc/ChangeLog | 5 +++++ gcc/tree.c | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9c3dcdab4c0..a0ca3f34a1c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sun Dec 9 20:19:32 2001 Richard Kenner + Douglas B. Rupp + + * tree.c (append_random_char): Conditionalize INO for VMS. + 2001-12-09 Richard Henderson * cfgcleanup.c (label_is_jump_target_p): New function. diff --git a/gcc/tree.c b/gcc/tree.c index b60fdc74b81..45d18f6acde 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4467,14 +4467,20 @@ append_random_chars (template) { struct stat st; - /* VALUE should be unique for each file and must - not change between compiles since this can cause - bootstrap comparison errors. */ + /* VALUE should be unique for each file and must not change between + compiles since this can cause bootstrap comparison errors. */ if (stat (main_input_filename, &st) < 0) abort (); - value = st.st_dev ^ st.st_ino ^ st.st_mtime; + /* 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; } template += strlen (template);