This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] adding missing LTO to some warning options (PR 78606)
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>
- Date: Fri, 13 Jan 2017 19:49:22 +0100
- Subject: Re: [PATCH] adding missing LTO to some warning options (PR 78606)
- Authentication-results: sourceware.org; auth=none
- References: <06c24069-90af-5778-52a2-c9167eb109ab@gmail.com>
On Jan 10 2017, Martin Sebor <msebor@gmail.com> wrote:
> Index: gcc/testsuite/gcc.dg/pr78768.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/pr78768.c (revision 0)
> +++ gcc/testsuite/gcc.dg/pr78768.c (working copy)
> @@ -0,0 +1,13 @@
> +/* PR c/78768 - -Walloca-larger-than and -Wformat-length warnings disabled
> + by -flto
> + { dg-do run }
> + { dg-options "-O2 -Walloca-larger-than=10 -Wformat -Wformat-length -flto" } */
> +
> +int main (void)
> +{
> + char *d = (char *)__builtin_alloca (12); /* { dg-warning "argument to .alloca. is too large" } */
> +
> + __builtin_sprintf (d, "%32s", "x"); /* { dg-warning "directive writing 32 bytes into a region of size 12" "-Wformat-length" { xfail *-*-* } } */
> +
> + return 0;
> +}
Why is that a run test? It cannot be usefully executed.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."