Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-39.c
blob4d17f14725f185bb6f16ac548608710bda3b926d
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 } */
7 void f (int);
9 void vlaNx3_to_pia1 (int n)
11 int a[n][3];
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" }
18 void vlaNxN_to_pia1 (int n)
20 int a[n][n];
22 /* Same as above. */
23 f (((*(int(*)[4])&a[1][2]))[3]); // { dg-warning "\\\[-Wuninitialized" }
26 void vlaNxN_to_pvla4xN (int n)
28 int a[n][n];
30 /* Same as above. */
31 f (((*(int(*)[4][n])&a[1][2]))[3][4]); // { dg-warning "\\\[-Wuninitialized" }
34 void vlaN_to_pia2 (int n)
36 int a[n];
38 /* Same as above. */
39 f (((*(int(*)[3][4])&a[1]))[2][3]); // { dg-warning "\\\[-Wuninitialized" }
42 void vlaN_to_pvlaNx4 (int n)
44 int a[n];
46 /* Same as above. */
47 f (((*(int(*)[n][4])&a[1]))[1][3]); // { dg-warning "\\\[-Wuninitialized" }