analyzer: enable taint state machine by default [PR103533]
[official-gcc.git] / gcc / testsuite / c-c++-common / auto-init-8.c
blob863f2ba87d7d94dea2f220d65a6dbf9ceaf692c5
1 /* Verify pattern initialization for array, union, and structure type automatic variables. */
2 /* { dg-do compile } */
3 /* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */
5 struct S
7 int f1;
8 float f2;
9 char f3[20];
12 union U
14 char u1[5];
15 int u2;
16 float u3;
19 double result;
21 double foo()
23 int temp1[3];
24 double temp2[3];
25 struct S temp3;
26 union U temp4;
28 result = temp1[2] + temp2[1] + temp3.f2 + temp4.u3;
29 return result;
32 /* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(12, 1, \&\"temp1\"" "gimple" } } */
33 /* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(24, 1, \&\"temp2\"" "gimple" } } */
34 /* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(28, 1, \&\"temp3\"" "gimple" } } */
35 /* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\((8|5), 1, \&\"temp4\"" "gimple" } } */