Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / c-c++-common / auto-init-1.c
blob3e6a4984eea228713a9b8ed9c487a9d1a620575b
1 /* Verify zero initialization for integer and pointer type automatic variables. */
2 /* { dg-do compile { target { ilp32 || lp64 } } } */
3 /* { dg-options "-ftrivial-auto-var-init=zero -fno-short-enums -fdump-tree-gimple" } */
5 #ifndef __cplusplus
6 # define bool _Bool
7 #endif
9 enum E {
10 N1 = 0,
11 N2,
15 extern void bar (char, short, int, enum E, long, long long, int *, bool);
17 void foo()
19 char temp1;
20 short temp2;
21 int temp3;
22 enum E temp4;
23 long temp5;
24 long long temp6;
25 int *temp7;
26 bool temp8;
28 bar (temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8);
29 return;
32 /* { dg-final { scan-tree-dump "temp1 = .DEFERRED_INIT \\(1, 2, \&\"temp1\"" "gimple" } } */
33 /* { dg-final { scan-tree-dump "temp2 = .DEFERRED_INIT \\(2, 2, \&\"temp2\"" "gimple" } } */
34 /* { dg-final { scan-tree-dump "temp3 = .DEFERRED_INIT \\(4, 2, \&\"temp3\"" "gimple" } } */
35 /* { dg-final { scan-tree-dump "temp4 = .DEFERRED_INIT \\(4, 2, \&\"temp4\"" "gimple" } } */
36 /* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(4, 2, \&\"temp5\"" "gimple" { target ilp32 } } } */
37 /* { dg-final { scan-tree-dump "temp5 = .DEFERRED_INIT \\(8, 2, \&\"temp5\"" "gimple" { target lp64 } } } */
38 /* { dg-final { scan-tree-dump "temp6 = .DEFERRED_INIT \\(8, 2, \&\"temp6\"" "gimple" } } */
39 /* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(4, 2, \&\"temp7\"" "gimple" { target ilp32 } } } */
40 /* { dg-final { scan-tree-dump "temp7 = .DEFERRED_INIT \\(8, 2, \&\"temp7\"" "gimple" { target lp64 } } } */
41 /* { dg-final { scan-tree-dump "temp8 = .DEFERRED_INIT \\(1, 2, \&\"temp8\"" "gimple" } } */