Commit 40077d15 by Martin Liska Committed by Martin Liska

Provide proper error message for -flto=abcd.

2019-08-09  Martin Liska  <mliska@suse.cz>

	* opts.c (common_handle_option): Error for an invalid argument
	to -flto=.
2019-08-09  Martin Liska  <mliska@suse.cz>

	* gcc.dg/spellcheck-options-21.c: New test.

From-SVN: r274231
parent fe6c4dc4
2019-08-09 Martin Liska <mliska@suse.cz>
* opts.c (common_handle_option): Error for an invalid argument
to -flto=.
2019-08-09 Martin Liska <mliska@suse.cz>
* ipa-icf.c (sem_function::merge): Define AUTO_DUMP_SCOPE and
use dump_printf to report optimization.
(sem_variable::merge): Likwise.
......
......@@ -2822,6 +2822,14 @@ common_handle_option (struct gcc_options *opts,
opts->x_flag_lto = value ? "" : NULL;
break;
case OPT_flto_:
if (strcmp (arg, "none") != 0
&& strcmp (arg, "jobserver") != 0
&& atoi (arg) == 0)
error_at (loc,
"unrecognized argument to %<-flto=%> option: %qs", arg);
break;
case OPT_w:
dc->dc_inhibit_warnings = true;
break;
......
2019-08-09 Martin Liska <mliska@suse.cz>
* gcc.dg/spellcheck-options-21.c: New test.
2019-08-09 Martin Liska <mliska@suse.cz>
* g++.dg/ipa/ipa-icf-2.C: Add -optimized to -fdump-ipa-icf.
* g++.dg/ipa/ipa-icf-3.C: Likewise.
* g++.dg/ipa/ipa-icf-4.C: Likewise.
......
/* { dg-do compile } */
/* { dg-options "-flto=sparta" } */
/* { dg-error "unrecognized argument to '-flto=' option: 'sparta'" "" { target *-*-* } 0 } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment