Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr78768.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
line wrap: on
line source
/* PR c/78768 - -Walloca-larger-than and -Wformat-overflow warnings disabled by -flto { dg-do link } { dg-require-effective-target lto } { dg-require-linker-plugin "" } { dg-options "-O2 -Walloca-larger-than=10 -Wformat -Wformat-overflow -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-overflow" { xfail *-*-* } } */ return 0; }