Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
6fc5cb06
Commit
6fc5cb06
authored
Sep 16, 2008
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test for
#2469
parent
6a83fcc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
testsuite/tests/ghc-regress/ffi/should_run/2469.hs
testsuite/tests/ghc-regress/ffi/should_run/2469.hs
+15
-0
testsuite/tests/ghc-regress/ffi/should_run/all.T
testsuite/tests/ghc-regress/ffi/should_run/all.T
+2
-0
No files found.
testsuite/tests/ghc-regress/ffi/should_run/2469.hs
0 → 100644
View file @
6fc5cb06
import
Foreign
import
Foreign.C
type
IOF
=
Int
->
IO
Int
foreign
import
ccall
"wrapper"
wrap_f_io
::
IOF
->
IO
(
FunPtr
IOF
)
foreign
import
ccall
"dynamic"
f_io
::
FunPtr
IOF
->
IOF
double_io
::
Int
->
IO
Int
double_io
x
=
return
(
x
*
2
)
main
=
do
double2
<-
wrap_f_io
double_io
x
<-
f_io
double2
42
return
()
testsuite/tests/ghc-regress/ffi/should_run/all.T
View file @
6fc5cb06
...
...
@@ -122,3 +122,5 @@ test('2276_ghci', [ skip_if_not_windows, only_ways(['ghci']),
cmd_prefix
('
$MAKE --no-print-directory 2276_ghci_setup &&
'),
extra_clean
(['
2276_ghci_c.o
'])
],
compile_and_run
,
['
-fobject-code 2276_ghci_c.o
'])
test
('
2469
',
normal
,
compile_and_run
,
['
-optc-std=gnu99
'])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment