This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHv2][LTO/PGO] Warn when both -flto and -fprofile-generate are enabled


Markus Trippelsdorf <markus@trippelsdorf.de> writes:

> diff --git a/gcc/opts.c b/gcc/opts.c
> index fdc903f9271a..581d2e948483 100644
> --- a/gcc/opts.c
> +++ b/gcc/opts.c
> @@ -833,6 +833,9 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
>  	error_at (loc, "only one -flto-partition value can be specified");
>      }
>  
> +  if (opts->x_flag_generate_lto && opts->x_flag_profile_generate)
> +    warning_at (loc, 0, "enabling both -fprofile-generate and -flto is a bad idea");

This warning is not very helpful in this form.  Rather say something
like `causes excessive memory consumption' if this is the problem.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]