analyzer: enable taint state machine by default [PR103533]
[official-gcc.git] / gcc / testsuite / c-c++-common / pr68107.c
blobb9f9afec92a615c2404e670db40fc8130686a2ae
1 /* PR c/68107 */
2 /* { dg-do compile } */
4 #define N ((__SIZE_MAX__ / sizeof (int)) / 2 + 1)
6 typedef int (*T1)[N]; /* { dg-error "15:exceeds maximum object size" } */
7 typedef int (*T2)[N - 1];
8 typedef int (*T3)[N][N]; /* { dg-error "15:exceeds maximum object size" } */
9 typedef int (*T4)[N - 1][N - 1]; /* { dg-error "15:exceeds maximum object size" } */
10 typedef int (**T5)[N]; /* { dg-error "16:exceeds maximum object size" } */
12 struct S {
13 int (*q1)[N]; /* { dg-error "9:exceeds maximum object size" } */
14 int (*q2)[N - 1];
15 int (*q3)[N][N]; /* { dg-error "9:exceeds maximum object size" } */
16 int (*q4)[N - 1][N - 1]; /* { dg-error "9:exceeds maximum object size" } */
17 int (**q5)[N]; /* { dg-error "10:exceeds maximum object size" } */
20 void fn1 (int (*p1)[N]); /* { dg-error "17:exceeds maximum object size" } */
21 void fn2 (int (*p1)[N - 1]);
22 void fn3 (int (*p3)[N][N]); /* { dg-error "17:exceeds maximum object size" } */
23 void fn4 (int (*p4)[N - 1][N - 1]); /* { dg-error "17:exceeds maximum object size" } */
24 void fn5 (int (**p5)[N]); /* { dg-error "18:exceeds maximum object size" } */
26 void
27 fn (void)
29 int (*n1)[N]; /* { dg-error "9:exceeds maximum object size" } */
30 int (*n2)[N - 1];
31 int (*n3)[N][N]; /* { dg-error "9:exceeds maximum object size" } */
32 int (*n4)[N - 1][N - 1]; /* { dg-error "9:exceeds maximum object size" } */
33 int (**n5)[N]; /* { dg-error "10:exceeds maximum object size" } */
35 sizeof (int (*)[N]); /* { dg-error "exceeds maximum object size" } */
36 sizeof (int [N]); /* { dg-error "exceeds maximum object size" } */