1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dse1" } */
3
4
5 typedef unsigned int wchar_t;
6 struct printf_info
7 {
8 int prec;
9 int width;
10 wchar_t spec;
11 unsigned int is_long_double:1;
12 unsigned int is_short:1;
13 unsigned int is_long:1;
14 unsigned int alt:1;
15 unsigned int space:1;
16 unsigned int left:1;
17 unsigned int showsign:1;
18 unsigned int group:1;
19 unsigned int extra:1;
20 unsigned int is_char:1;
21 unsigned int wide:1;
22 unsigned int i18n:1;
23 unsigned int __pad:4;
24 unsigned short int user;
25 wchar_t pad;
26 } info;
27
28 void bar (struct printf_info *);
29
foo(int prec,int width,wchar_t spec,unsigned int is_long_double,unsigned int is_short,unsigned int is_long,unsigned int alt,unsigned int space,unsigned int left,unsigned int showsign,unsigned int group,wchar_t pad)30 void foo(int prec,
31 int width,
32 wchar_t spec,
33 unsigned int is_long_double,
34 unsigned int is_short,
35 unsigned int is_long,
36 unsigned int alt,
37 unsigned int space,
38 unsigned int left,
39 unsigned int showsign,
40 unsigned int group,
41 wchar_t pad)
42 {
43 struct printf_info info = {
44 .prec = prec,
45 .width = width,
46 .spec = spec,
47 .is_long_double = is_long_double,
48 .is_short = is_short,
49 .is_long = is_long,
50 .alt = alt,
51 .space = space,
52 .left = left,
53 .showsign = showsign,
54 .group = group,
55 .pad = pad,
56 .extra = 0,
57 .wide = sizeof (char) != 1 };
58
59 bar (&info);
60 }
61
62 /* { dg-final { scan-tree-dump-times "MEM\\\[\\(struct printf_info \\*\\)&info \\+ \[0-9\]+B\\\] = {}" 1 "dse1" } } */
63