aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr105969.c
blob: 52c63fc2efe6ae6f8012d2b7c12e3787e418f32f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-Wall" } */

struct A
{
  char a[0][0][0];
};
extern struct A b[][2];
void f (void)
{
  __builtin_sprintf (b[0][0].a[1][0], "%s", b[0][0].a[1][0]); /* { dg-warning "past the end" } */
  /* { dg-warning "overlaps destination" "" { target *-*-* } .-1 } */
}