2 /* { dg-options "-O2" } */
6 struct B
{ char *b1
; int b2
; int b3
; };
7 struct C
{ char *c1
; int c2
; struct B
*c3
; };
8 extern struct A
*f1 (char *s
);
9 static struct A
*f2 (struct C
*x
);
10 __attribute__ ((noinline
, noclone
)) int f3 (struct A
*x
, struct A
*z
) { asm volatile ("" : : "g" (x
), "g" (z
) : "memory"); return 0; }
11 __attribute__ ((noinline
, noclone
)) void f4 (struct A
*x
, char *y
, struct A
*z
) { asm volatile ("" : : "g" (x
), "g" (z
), "g" (y
) : "memory"); }
12 __attribute__ ((noinline
, noclone
)) struct B
*f5 (void) { static char b
[32]; static struct B f3
= { b
, 0, 32 }; return &f3
; }
13 __attribute__ ((noinline
, noclone
)) int f6 (struct B
*p
, char *w
, int z
) { asm volatile ("" : : "g" (p
), "g" (w
), "g" (z
) : "memory"); return 0; }
14 __attribute__ ((noinline
, noclone
)) void f7 (struct B
*p
) { asm volatile ("" : : "g" (p
) : "memory"); }
15 __attribute__ ((noinline
, noclone
)) void f8 (struct B
*p
) { asm volatile ("" : : "g" (p
) : "memory"); }
16 __attribute__ ((noinline
, noclone
)) void f9 (struct A
*x
) { asm volatile ("" : : "g" (x
) : "memory"); }
17 __attribute__ ((noinline
, noclone
)) struct A
*f10 (void) { static struct A j
; asm volatile ("" : : : "memory"); return &j
; }
18 __attribute__ ((noinline
, noclone
)) struct A
*f11 (void) { static struct A j
; asm volatile ("" : : : "memory"); return &j
; }
19 __attribute__ ((noinline
, noclone
)) struct A
*f12 (int b
) { static struct A j
; asm volatile ("" : : "g" (b
) : "memory"); return &j
; }
20 __attribute__ ((noinline
, noclone
)) struct A
*f13 (int i
) { static struct A j
; asm volatile ("" : : "g" (i
) : "memory"); return &j
; }
21 __attribute__ ((noinline
, noclone
)) struct A
*f14 (double d
) { static struct A j
; asm volatile ("" : : "g" (&d
) : "memory"); return &j
; }
22 __attribute__ ((noinline
, noclone
)) struct A
*f15 (char *s
) { static struct A j
; asm volatile ("" : : "g" (s
) : "memory"); return &j
; }
23 char *t
= "0123456789abcdef";
24 char *u
= "0123456789.+-e";
26 __attribute__ ((noinline
, noclone
)) struct A
*
114 if (__builtin_strncmp ("null", x
->c1
+ j
, x
->c2
- j
))
160 f6 (x
->c3
, x
->c1
+ j
, x
->c2
- j
);
177 f6 (x
->c3
, x
->c1
+ j
, x
->c2
- j
- 1);
185 f6 (x
->c3
, x
->c1
+ j
, x
->c2
- j
- 1);
198 f6 (x
->c3
, x
->c1
+ j
, x
->c2
- j
- 1);
208 if (__builtin_strchr (t
, c
))
215 (((x
->c1
[j
] <= '9') ? x
->c1
[j
] - '0' : (x
->c1
[j
] & 7) + 9) << 12)
216 + (((x
->c1
[j
+ 1] <= '9') ? x
->c1
[j
+ 1] - '0' : (x
->c1
[j
+ 1] & 7) + 9) << 8)
217 + (((x
->c1
[j
+ 2] <= '9') ? x
->c1
[j
+ 2] - '0' : (x
->c1
[j
+ 2] & 7) + 9) << 4)
218 + ((x
->c1
[j
+ 3] <= '9') ? x
->c1
[j
+ 3] - '0' : (x
->c1
[j
+ 3] & 7) + 9);
222 f6 (x
->c3
, (char *) w
, 1);
226 w
[0] = 0xc0 | (s
>> 6);
227 w
[1] = 0x80 | (s
& 0x3f);
228 f6 (x
->c3
, (char *) w
, 2);
232 w
[0] = 0x0 | (s
>> 12);
233 w
[1] = 0x80 | ((s
>> 6) & 0x3f);
234 w
[2] = 0x80 | (s
& 0x3f);
235 f6 (x
->c3
, (char *) w
, 3);
248 if (__builtin_strncmp ("true", x
->c1
+ j
, x
->c2
- j
) == 0)
259 else if (__builtin_strncmp ("false", x
->c1
+ j
, x
->c2
- j
) == 0)
277 if (!c
|| !__builtin_strchr (u
, c
))
288 if (c
== '.' || c
== 'e')
303 #if __SIZEOF_POINTER__ == __SIZEOF_LONG__
304 if (((unsigned long) o
> (unsigned long) -4000L))
305 #elif __SIZEOF_POINTER__ == __SIZEOF_INT__
306 if (((__UINTPTR_TYPE__
) o
> (__UINTPTR_TYPE__
) -4000U))
348 else if (c
== '"' || c
== '\'')
364 f6 (x
->c3
, x
->c1
+ j
, x
->c2
- j
);
365 g
= __builtin_strdup (x
->c3
->b1
);
391 #if __SIZEOF_POINTER__ == __SIZEOF_LONG__
392 if (((unsigned long) o
> (unsigned long) -4000L))
393 #elif __SIZEOF_POINTER__ == __SIZEOF_INT__
394 if (((__UINTPTR_TYPE__
) o
> (__UINTPTR_TYPE__
) -4000U))
428 if (a
!= 2 && b
!= 2)
441 asm volatile ("" : : : "memory");
442 struct A
*r
= f1 ("{ \"id\": null, \"blahah\": \"foobarbazbar\", \"barbar\": { \"barbarbarba\":"
443 "\"abcdefgh\", \"ijklmnopqr\": \"stuvwxyzabcdefghijklmnopqrstuv\", \"xyzxyz\":"