PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr82498.c
blob19a42f0a3c75ba18e4be653476aca991e4be48ff
1 /* PR target/82498 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-original" } */
4 /* { dg-final { scan-tree-dump-times "x r<< y" 4 "original" { target int32 } } } */
5 /* { dg-final { scan-tree-dump-times "x r>> y" 4 "original" { target int32 } } } */
7 unsigned
8 f1 (unsigned x, int y)
10 return (x << y) | (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y));
13 unsigned
14 f2 (unsigned x, int y)
16 return (x << y) | (x >> (-y & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
19 unsigned
20 f3 (unsigned x, int y)
22 return (x >> y) | (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y));
25 unsigned
26 f4 (unsigned x, int y)
28 return (x >> y) | (x << (-y & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
31 unsigned
32 f5 (unsigned x, int y)
34 return (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y)) | (x << y);
37 unsigned
38 f6 (unsigned x, int y)
40 return (x >> (-y & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) | (x << y);
43 unsigned
44 f7 (unsigned x, int y)
46 return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y)) | (x >> y);
49 unsigned
50 f8 (unsigned x, int y)
52 return (x << (-y & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) | (x >> y);