1 /* PR middle-end/27959 */
2 /* { dg-do run { target { int32plus } } } */
3 /* { dg-options "-O2" } */
4 /* { dg-options "-O2 -mtune=z990" { target s390*-*-* } } */
6 extern void abort (void);
10 unsigned int b1, b2, b3;
27 __attribute__((noinline))
28 foo (void *x, struct B *y, unsigned int *z)
32 if (y->b1 != 7 || y->b2 != 5 || y->b3 != 3 || y->b4)
39 __attribute__((noinline))
40 baz (unsigned int *x, unsigned int y)
42 asm volatile ("" : : "r" (&x), "r" (&y) : "memory");
46 inline int bar (unsigned int *x, unsigned int y)
54 __attribute__((noinline))
55 test (struct D *x, unsigned int *y)
62 c = ((unsigned char) x->d1[0]
63 + ((unsigned char) x->d1[1] << 8)
64 + ((unsigned char) x->d1[2] << 16)
65 + ((short) x->d1[3] << 24));
69 ((char *) &d)[0] = x->d1[0];
70 ((char *) &d)[1] = x->d1[1];
71 ((char *) &d)[2] = x->d1[2];
72 ((char *) &d)[3] = x->d1[3];
76 b.b1 = c / 10000L % 10000;
86 unsigned int x = 900070503;
88 struct C c = { 0 }, *cptr = &c;
89 struct D d = { (char *) &x, &cptr, 0 };
90 if (test (&d, &y) != &y)