gcc.c (do_spec_1): In `%O' case, if we computed saved_suffix, use it in the new assoc...
authorTom Tromey <tromey@redhat.com>
Wed, 30 May 2001 23:56:48 +0000 (23:56 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Wed, 30 May 2001 23:56:48 +0000 (23:56 +0000)
* gcc.c (do_spec_1): In `%O' case, if we computed saved_suffix,
use it in the new association.

From-SVN: r42728

gcc/ChangeLog
gcc/gcc.c

index 464d625744074928aa824603e060aaf9ad49384b..c25fe8b933de8604f6c50057e7d24898fb4d25e5 100644 (file)
@@ -1,3 +1,8 @@
+2001-05-30  Tom Tromey  <tromey@redhat.com>
+
+       * gcc.c (do_spec_1): In `%O' case, if we computed saved_suffix,
+       use it in the new association.
+
 2001-05-30  Loren J. Rittle  <ljrittle@acm.org>
            John David Anglin  <dave@hiauly1.hia.nrc.ca>
 
index e613291b0c5e86cb9cc931c0d8637ef181aedd65..948793bcf4b67d2db41932aa948146ff7d332dd5 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4296,7 +4296,8 @@ do_spec_1 (spec, inswitch, soft_matched_part)
                      && t->unique == (c != 'g'))
                    break;
 
-               /* Make a new association if needed.  %u and %j require one.  */
+               /* Make a new association if needed.  %u and %j
+                  require one.  */
                if (t == 0 || c == 'u' || c == 'j')
                  {
                    if (t == 0)
@@ -4306,7 +4307,13 @@ do_spec_1 (spec, inswitch, soft_matched_part)
                        temp_names = t;
                      }
                    t->length = suffix_length;
-                   t->suffix = save_string (suffix, suffix_length);
+                   if (saved_suffix)
+                     {
+                       t->suffix = saved_suffix;
+                       saved_suffix = NULL;
+                     }
+                   else
+                     t->suffix = save_string (suffix, suffix_length);
                    t->unique = (c != 'g');
                    temp_filename = make_temp_file (t->suffix);
                    temp_filename_length = strlen (temp_filename);