PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / pr53942.c
blob6a51d2673dd7313c21312ce4b09cdda12798c819
1 /* PR rtl-optimization/53942 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* { dg-additional-options "-mtune=pentium2" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
6 struct S
8 unsigned short w[3];
9 unsigned int x, y;
12 struct S *baz (void);
14 __attribute__ ((noinline))
15 static unsigned char
16 foo (struct S *x, unsigned char y)
18 unsigned char c = 0;
19 unsigned char v = x->w[0];
20 c |= v;
21 v = ((x->w[1]) & (1 << y)) ? 1 : 0;
22 c |= v << 1;
23 v = ((x->w[2]) & 0xff) & (1 << y);
24 c |= v << 2;
25 return c;
28 void
29 bar (void)
31 struct S *s = baz ();
32 s->x = foo (s, 6);
33 s->y = foo (s, 7);