aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/warn/Warray-bounds-3.C
blob: a8585717988043a60b88193df209dab45460bdc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */

extern void function(void * x);

struct A {
    long x;
    char d[0];
};


void test(A * a) {
    function((char *)a - 4); /* { dg-bogus "below array bounds" } */
}