1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_thumb2_ok } */
3 /* { dg-options "-march=armv7-a -mfloat-abi=hard -mfpu=neon -O2" } */
4 /* { dg-skip-if "need SIMD instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */
5 /* { dg-skip-if "need SIMD instructions" { *-*-* } { "-mfpu=vfp*" } { "" } } */
6 
7 #define BUF 100
8 long a[BUF];
9 
10 typedef unsigned int size_t;
11 typedef unsigned int wchar_t;
12 void *memset (void *s, int c, size_t n);
13 struct printf_info
14 {
15   int prec;
16   int width;
17   wchar_t spec;
18   unsigned int is_long_double:1;
19   unsigned int is_short:1;
20   unsigned int is_long:1;
21   unsigned int alt:1;
22   unsigned int space:1;
23   unsigned int left:1;
24   unsigned int showsign:1;
25   unsigned int group:1;
26   unsigned int extra:1;
27   unsigned int is_char:1;
28   unsigned int wide:1;
29   unsigned int i18n:1;
30   unsigned int __pad:4;
31   unsigned short int user;
32   wchar_t pad;
33 };
34 
35 void bar (int *alt, int *space, int *left, int *showsign,
36 	  int *group,
37 	  int *is_long_double,
38 	  int *is_short,
39 	  int *is_long,
40 	  int *width,
41 	  int *prec,
42 	  int *use_outdigits,
43 	  unsigned int *pad,
44 	  wchar_t *spec);
45 void __printf_fp (char *s, struct printf_info *pinfo);
foo(char * s)46 int foo(char *s)
47 {
48   int alt = 0;
49   int space = 0;
50   int left = 0;
51   int showsign = 0;
52   int group = 0;
53   int is_long_double = 0;
54   int is_short = 0;
55   int is_long = 0;
56   int width = 0;
57   int prec = -1;
58   int use_outdigits = 0;
59   unsigned int pad = L' ';
60   wchar_t spec;
61 
62   bar (&alt, &space, &left, &showsign, &group, &is_long_double,
63        &is_short, &is_long, &width, &prec, &use_outdigits, &pad, &spec);
64 
65   a[1] = a[0] + a[2] + a[3] + a[4] + a[5] + a[6];
66   a[2] = a[1] + a[3] + a[5] + a[5] + a[6] + a[7];
67   a[3] = a[2] + a[5] + a[7] + a[6] + a[7] + a[8];
68   a[4] = a[3] + a[7] + a[11] + a[7] + a[8] + a[9];
69   a[5] = a[5] + a[11] + a[13] + a[8] + a[9] + a[10];
70   a[6] = a[7] + a[13] + a[17] + a[9] + a[10] + a[11];
71   a[7] = a[11] + a[17] + a[19] + a[10] + a[11] + a[12];
72   a[8] = a[17] + a[19] + a[23] + a[29] + a[31] + a[37];
73 
74   {
75     struct printf_info info;
76     memset (&info, 0, sizeof (struct printf_info));
77     info.prec = prec;
78     info.width = width;
79     info.spec = spec;
80     info.is_long_double = is_long_double;
81     info.is_short = is_short;
82     info.is_long = is_long;
83     info.alt = alt;
84     info.space = space;
85     info.left = left;
86     info.showsign = showsign;
87     info.group = group;
88     info.pad = pad;
89     info.extra = 0;
90     info.i18n = use_outdigits;
91     info.wide = sizeof (wchar_t) != 1;
92 
93     __printf_fp (s, &info);
94   }
95 
96   return 0;
97 }
98 
99