On Jan 10 2017, Martin Sebor <mse...@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, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Reply via email to