Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / Warray-bounds-71.h
blob89d1068a2662161b7314955016fbd99220f0954d
1 /* Verify that -Warray-bounds suppression via #pragma GCC diagnostic
2 works at any call site in an inlining stack
3 { dg-do compile }
4 { dg-options "-O2 -Wall" } */
6 int a[4];
8 void f1 (int *p, int i)
10 #pragma GCC diagnostic push
11 #if IGNORE == '1'
12 # pragma GCC diagnostic ignored "-Warray-bounds"
13 #endif
14 p[i + 1] = 0;
15 #pragma GCC diagnostic pop
18 void f2 (int *p, int i)
20 #pragma GCC diagnostic push
21 #if IGNORE == '2'
22 # pragma GCC diagnostic ignored "-Warray-bounds"
23 #endif
24 f1 (p + 1, i + 1);
25 #pragma GCC diagnostic pop
28 void f3 (int *p, int i)
30 #pragma GCC diagnostic push
31 #if IGNORE == '3'
32 # pragma GCC diagnostic ignored "-Warray-bounds"
33 #endif
34 f2 (p + 1, i + 1);
35 #pragma GCC diagnostic pop
38 void f4 (void)
40 #pragma GCC diagnostic push
41 #if IGNORE == '4'
42 # pragma GCC diagnostic ignored "-Warray-bounds"
43 #endif
44 f3 (a, 1);
45 #pragma GCC diagnostic pop