+
+ static long return_5low () {
+ return 5;
+ }
+
+ static long return_5high () {
+ return 0x500000000;
+ }
+
+ public static int test_3_long_ret () {
+ long val = return_5low ();
+ return (int) (val - 2);
+ }
+
+ public static int test_1_long_ret2 () {
+ long val = return_5high ();
+ if (val > 0xffffffff)
+ return 1;
+ return 0;
+ }
+
+ public static void use_long_arg (ulong l) {
+ for (int i = 0; i < 10; ++i)
+ l ++;
+ }
+
+ public static ulong return_long_arg (object o, ulong perm) {
+ use_long_arg (perm);
+
+ perm = 0x8000000000000FFF;
+
+ use_long_arg (perm);
+
+ return perm;
+ }
+
+ public static int test_0_sparc_long_ret_regress_541577 () {
+ ulong perm = 0x8000000000000FFF;
+
+ ulong work = return_long_arg (null, perm);
+
+ return work == perm ? 0 : 1;
+ }
+
+ static void doit (double value, out long m) {
+ m = (long) value;
+ }
+
+ public static int test_0_ftol_clobber () {
+ long m;
+ doit (1.3, out m);
+ if (m != 1)
+ return 2;
+ return 0;
+ }