Hi, OPT_SPECIAL_unknown, OPT_SPECIAL_ignore, OPT_SPECIAL_program_name and OPT_SPECIAL_input_file are special options, which aren't in cl_options. This patch avoids
if (!(cl_options[foption->opt_index].flags & CL_TARGET)) on them. This patch skips them. OK to install? Thanks. H.J. --- 2012-11-26 H.J. Lu <hongjiu...@intel.com> PR lto/55474 * lto-wrapper.c (merge_and_complain): Handle OPT_SPECIAL_unknown, OPT_SPECIAL_ignore, OPT_SPECIAL_program_name and OPT_SPECIAL_input_file. diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 1f4d212..24de743 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -393,6 +393,12 @@ merge_and_complain (struct cl_decoded_option **decoded_options, struct cl_decoded_option *foption = &fdecoded_options[i]; switch (foption->opt_index) { + case OPT_SPECIAL_unknown: + case OPT_SPECIAL_ignore: + case OPT_SPECIAL_program_name: + case OPT_SPECIAL_input_file: + break; + default: if (!(cl_options[foption->opt_index].flags & CL_TARGET)) break;