aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/uninit-pr51010.c
blob: f28da46562ce058971928a30b2cf12b621a8b1eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O -Wuninitialized" } */

int f (int j)
{
  int a [10];
  return a [j]; /* { dg-warning "a\\\[j\\\]. is used uninitialized" } */
}
int g (int j)
{
  int a [10];
  return a [j+1]; /* { dg-warning "a\\\[<unknown>\\\]. is used uninitialized" } */
}