diff options
author | Martin Liska <mliska@suse.cz> | 2019-08-09 09:51:40 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-08-09 07:51:40 +0000 |
commit | 40077d15a87e7fe707b7282ab6f241737d2b3b18 (patch) | |
tree | 5b76223264b14ea3e01cfaee6d0b4799ec9c7d13 /gcc | |
parent | fe6c4dc41977ce168ba836010424bd05d104b944 (diff) | |
download | gcc-40077d15a87e7fe707b7282ab6f241737d2b3b18.zip gcc-40077d15a87e7fe707b7282ab6f241737d2b3b18.tar.gz gcc-40077d15a87e7fe707b7282ab6f241737d2b3b18.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/opts.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/spellcheck-options-21.c | 3 |
4 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 21652c8..50a2b8f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 73022f3..317b7e5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 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. diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-21.c b/gcc/testsuite/gcc.dg/spellcheck-options-21.c new file mode 100644 index 0000000..3e0e8a8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/spellcheck-options-21.c @@ -0,0 +1,3 @@ +/* { dg-do compile } */ +/* { dg-options "-flto=sparta" } */ +/* { dg-error "unrecognized argument to '-flto=' option: 'sparta'" "" { target *-*-* } 0 } */ |