aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 0eff4c11..db8d3637 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -459,6 +459,14 @@ if 'benchmark' not in str(sys.argv):
// global structs with i64s
printf("*%d,%Ld*\n*%d,%Ld*\n", iub[0].c, iub[0].d, iub[1].c, iub[1].d);
+ // Math mixtures with doubles
+ {
+ uint64_t a = 5;
+ double b = 6.8;
+ uint64_t c = a * b;
+ printf("*prod:%llu*\n*%d,%d,%d*", c, (int)&a, (int)&b, (int)&c); // printing addresses prevents optimizations
+ }
+
// Basic (rounded, for now) math. Just check compilation.
int64_t a = 0x1234def123450789ULL;
a--; if (truthy()) a--; // confuse optimizer
@@ -472,7 +480,8 @@ if 'benchmark' not in str(sys.argv):
self.do_run(src, '*1311918518731868200\n0,0,0,1,1\n1,0,1,0,1*\n*245127260211081*\n*245127260209443*\n' +
'*18446744073709552000*\n*576460752303423500*\n' +
'm1: 127\n*123*\n*127*\n' +
- '*55,17179869201*\n*122,25769803837*\n')
+ '*55,17179869201*\n*122,25769803837*\n' +
+ '*prod:34*\n')
Settings.CORRECT_SIGNS = 1