summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Warray-bounds-7.c
blob: a32492ccc7aa0f5e6472e6c0f9113fb66136ca7e (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;
}