annotate gcc/testsuite/gcc.dg/pr78768.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR c/78768 - -Walloca-larger-than and -Wformat-overflow warnings disabled
kono
parents:
diff changeset
2 by -flto
kono
parents:
diff changeset
3 { dg-do link }
kono
parents:
diff changeset
4 { dg-require-effective-target lto }
kono
parents:
diff changeset
5 { dg-require-linker-plugin "" }
kono
parents:
diff changeset
6 { dg-options "-O2 -Walloca-larger-than=10 -Wformat -Wformat-overflow -flto" } */
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 int main (void)
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 char *d = (char *)__builtin_alloca (12); /* { dg-warning "argument to .alloca. is too large" } */
kono
parents:
diff changeset
11
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
12 __builtin_sprintf (d, "%32s", "x"); /* { dg-warning "directive writing 32 bytes into a region of size 12" "-Wformat-overflow" } */
111
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 return 0;
kono
parents:
diff changeset
15 }