diff options
Diffstat (limited to 'testsuite/tests/codeGen/should_run/3561.hs')
-rw-r--r-- | testsuite/tests/codeGen/should_run/3561.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/3561.hs b/testsuite/tests/codeGen/should_run/3561.hs new file mode 100644 index 0000000000..44258a839c --- /dev/null +++ b/testsuite/tests/codeGen/should_run/3561.hs @@ -0,0 +1,10 @@ +main = print $ pqr' 0 1 + +pqr' :: Int -> Int -> Integer +pqr' a b | a == b - 1 = rab + | otherwise = ram * rmb + where m = (a + b) `div` 2 + ram = pqr' a m + rmb = pqr' m b + rab = toInteger (6 * b - 5) * toInteger (2 * b - 1) * + toInteger (6 * b - 1) |