add test for #5747
authorSimon Marlow <marlowsd@gmail.com>
Thu, 5 Jan 2012 14:08:55 +0000 (14:08 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 6 Jan 2012 11:29:56 +0000 (11:29 +0000)
testsuite/driver/testlib.py
testsuite/tests/codeGen/should_run/5747.hs [new file with mode: 0644]
testsuite/tests/codeGen/should_run/5747.stdout [new file with mode: 0644]
testsuite/tests/codeGen/should_run/all.T

index 746d122..d5e6300 100644 (file)
@@ -219,6 +219,14 @@ def _extra_run_opts( opts, v ):
 
 # -----
 
+def extra_hc_opts( val ):
+    return lambda opts, v=val: _extra_hc_opts(opts, v);
+
+def _extra_hc_opts( opts, v ):
+    opts.extra_hc_opts = v
+
+# -----
+
 def extra_clean( files ):
     return lambda opts, v=files: _extra_clean(opts, v);
 
diff --git a/testsuite/tests/codeGen/should_run/5747.hs b/testsuite/tests/codeGen/should_run/5747.hs
new file mode 100644 (file)
index 0000000..2975b55
--- /dev/null
@@ -0,0 +1 @@
+main = print (cos 0)
diff --git a/testsuite/tests/codeGen/should_run/5747.stdout b/testsuite/tests/codeGen/should_run/5747.stdout
new file mode 100644 (file)
index 0000000..d3827e7
--- /dev/null
@@ -0,0 +1 @@
+1.0
index fcaf11b..b47d4a8 100644 (file)
@@ -87,3 +87,4 @@ test('5149', omit_ways(['ghci']), multi_compile_and_run,
                  ['5149', [('5149_cmm.cmm', '')], ''])
 test('5129', normal, compile_and_run, [''])
 test('5626', exit_code(1), compile_and_run, [''])
+test('5747', if_arch('i386', extra_hc_opts('-msse2')), compile_and_run, ['-O2'])