]> git.ipfire.org Git - people/ms/gcc.git/blob - gcc/testsuite/gcc.dg/uninit-39.c
testsuite: Remove obsolete comments [PR108898]
[people/ms/gcc.git] / gcc / testsuite / gcc.dg / uninit-39.c
1 /* PR c/98592 - ICE in gimple_canonical_types_compatible_p while formatting
2 a MEM_REF
3 { dg-do compile }
4 { dg-options "-O2 -Wall" }
5 { dg-require-effective-target alloca } */
6
7 void f (int);
8
9 void vlaNx3_to_pia1 (int n)
10 {
11 int a[n][3];
12
13 /* The VLA isn't formatted correctly due to PR 98587. Just verify
14 there is no ICE and a warning is issued. */
15 f (((*(int(*)[4])&a[1][2]))[3]); // { dg-warning "\\\[-Wuninitialized" }
16 }
17
18 void vlaNxN_to_pia1 (int n)
19 {
20 int a[n][n];
21
22 /* Same as above. */
23 f (((*(int(*)[4])&a[1][2]))[3]); // { dg-warning "\\\[-Wuninitialized" }
24 }
25
26 void vlaNxN_to_pvla4xN (int n)
27 {
28 int a[n][n];
29
30 /* Same as above. */
31 f (((*(int(*)[4][n])&a[1][2]))[3][4]); // { dg-warning "\\\[-Wuninitialized" }
32 }
33
34 void vlaN_to_pia2 (int n)
35 {
36 int a[n];
37
38 /* Same as above. */
39 f (((*(int(*)[3][4])&a[1]))[2][3]); // { dg-warning "\\\[-Wuninitialized" }
40 }
41
42 void vlaN_to_pvlaNx4 (int n)
43 {
44 int a[n];
45
46 /* Same as above. */
47 f (((*(int(*)[n][4])&a[1]))[1][3]); // { dg-warning "\\\[-Wuninitialized" }
48 }