* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / ishft_1.f90
blob88edd30efdde2559656261d7e1cdce330d8c2304
1 ! { dg-do run }
2 ! verifies basic functioning of the ishft and ishftc intrinsics
3 if (ishft (1_1, 0) /= 1) call abort
4 if (ishft (1_1, 1) /= 2) call abort
5 if (ishft (3_1, 1) /= 6) call abort
6 if (ishft (-1_1, 1) /= -2) call abort
7 if (ishft (-1_1, -1) /= 127) call abort
8 if (ishft (96_1, 2) /= -128) call abort
10 if (ishft (1_2, 0) /= 1) call abort
11 if (ishft (1_2, 1) /= 2) call abort
12 if (ishft (3_2, 1) /= 6) call abort
13 if (ishft (-1_2, 1) /= -2) call abort
14 if (ishft (-1_2, -1) /= 32767) call abort
15 if (ishft (16384_2 + 8192_2, 2) /= -32768_4) call abort
17 if (ishft (1_4, 0) /= 1) call abort
18 if (ishft (1_4, 1) /= 2) call abort
19 if (ishft (3_4, 1) /= 6) call abort
20 if (ishft (-1_4, 1) /= -2) call abort
21 if (ishft (-1_4, -1) /= 2147483647) call abort
22 if (ishft (1073741824_4 + 536870912_4, 2) /= -2147483648_8) call abort
24 if (ishft (1_8, 0) /= 1) call abort
25 if (ishft (1_8, 1) /= 2) call abort
26 if (ishft (3_8, 1) /= 6) call abort
27 if (ishft (-1_8, 1) /= -2) call abort
28 if (ishft (-1_8, -60) /= z'F') call abort
30 if (ishftc (1_1, 0) /= 1) call abort
31 if (ishftc (1_1, 1) /= 2) call abort
32 if (ishftc (3_1, 1) /= 6) call abort
33 if (ishftc (-1_1, 1) /= -1) call abort
34 if (ishftc (-1_1, -1) /= -1) call abort
35 if (ishftc (ishftc (96_1, 2), -2) /= 96) call abort
37 if (ishftc (1_2, 0) /= 1) call abort
38 if (ishftc (1_2, 1) /= 2) call abort
39 if (ishftc (3_2, 1) /= 6) call abort
40 if (ishftc (-1_2, 1) /= -1) call abort
41 if (ishftc (-1_2, -1) /= -1) call abort
42 if (ishftc (ishftc (25000_2, 2), -2) /= 25000) call abort
44 if (ishftc (1_4, 0) /= 1) call abort
45 if (ishftc (1_4, 1) /= 2) call abort
46 if (ishftc (3_4, 1) /= 6) call abort
47 if (ishftc (-1_4, 1) /= -1) call abort
48 if (ishftc (-1_4, -1) /= -1) call abort
49 if (ishftc (ishftc (1325876_4, 2), -2) /= 1325876) call abort
51 if (ishftc (1_8, 0) /= 1) call abort
52 if (ishftc (1_8, 1) /= 2) call abort
53 if (ishftc (3_8, 1) /= 6) call abort
54 if (ishftc (-1_8, 1) /= -1) call abort
55 if (ishftc (-1_8, -1) /= -1) call abort
56 if (ishftc (ishftc (1325876_8, 2), -2) /= 1325876) call abort
57 end