From c5f21b95fe2dc1339d0e3f598927c2c2769a10e2 Mon Sep 17 00:00:00 2001 From: jakub Date: Thu, 8 Nov 2012 20:13:13 +0000 Subject: PR driver/54789 * gcc.c (process_command): Use save_switch for synthesized -fcompare-debug=* option; mark the switch as known. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193337 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gcc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index a795981f002..b80af44282e 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3978,18 +3978,12 @@ process_command (unsigned int decoded_options_count, if (n_infiles == last_language_n_infiles && spec_lang != 0) warning (0, "%<-x %s%> after last input file has no effect", spec_lang); + /* Synthesize -fcompare-debug flag from the GCC_COMPARE_DEBUG + environment variable. */ if (compare_debug == 2 || compare_debug == 3) { - alloc_switch (); - switches[n_switches].part1 = concat ("fcompare-debug=", - compare_debug_opt, - NULL); - switches[n_switches].args = 0; - switches[n_switches].live_cond = 0; - switches[n_switches].validated = false; - switches[n_switches].known = false; - switches[n_switches].ordering = 0; - n_switches++; + const char *opt = concat ("-fcompare-debug=", compare_debug_opt, NULL); + save_switch (opt, 0, NULL, false, true); compare_debug = 1; } -- cgit v1.2.1