summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Warray-bounds-7.c
blob: fdd95789abaa576bb5ea5c2496c168dc4c312cfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -Warray-bounds" } */

char *p;

int main()
{
  p = "";
  if (p[0] == 0
      || (p[0] == '_' && p[1] == 0))  /* { dg-bogus "array bounds" "" } */
    return 0;
  return 1;
}