1 /* PR middle-end/27959 */
2 /* { dg-do run { target { stdint_types } } } */
3 /* { dg-options "-O2" } */
4 /* { dg-options "-O2 -mtune=z990" { target s390*-*-* } } */
7 extern void abort (void);
11 unsigned int b1, b2, b3;
28 __attribute__((noinline))
29 foo (void *x, struct B *y, unsigned int *z)
33 if (y->b1 != 7 || y->b2 != 5 || y->b3 != 3 || y->b4)
40 __attribute__((noinline))
41 baz (unsigned int *x, unsigned int y)
43 asm volatile ("" : : "r" (&x), "r" (&y) : "memory");
47 inline int bar (unsigned int *x, unsigned int y)
55 __attribute__((noinline))
56 test (struct D *x, unsigned int *y)
63 c = ((uint32_t) x->d1[0]
64 + ((uint32_t) x->d1[1] << 8)
65 + ((uint32_t) x->d1[2] << 16)
66 + ((uint32_t) x->d1[3] << 24));
70 ((char *) &d)[0] = x->d1[0];
71 ((char *) &d)[1] = x->d1[1];
72 ((char *) &d)[2] = x->d1[2];
73 ((char *) &d)[3] = x->d1[3];
77 b.b1 = c / 10000L % 10000;
87 uint32_t x = 900070503;
89 struct C c = { 0 }, *cptr = &c;
90 struct D d = { (char *) &x, &cptr, 0 };
91 if (test (&d, &y) != &y)