aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wstringop-overflow-72.c
blob: c10773e90a364f3549c3e5e73aeffcf22ef6e9f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* PR middle-end/101854 - Invalid warning -Wstringop-overflow wrong argument
   { dg-do compile }
   { dg-options "-O2 -Wall" } */

struct A { int a[5]; };

struct A g (int*, int[6][8]);

struct A f (void)
{
  int a[2];
  return g (a, 0);            // { dg-bogus "-Wstringop-overflow" }
}