Commit 652b83be authored by Ben Gamari's avatar Ben Gamari 🐢

testsuite: Test for #13786

parent 4549cadf
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
.PHONY: T13786
T13786 :
"$(TEST_HC)" $(TEST_HC_OPTS) -v0 -c -fPIC T13786a.c
"$(TEST_HC)" $(TEST_HC_OPTS) -v0 -c -fPIC T13786b.c
cat T13786.script | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -v0 T13786a.o T13786b.o T13786.hs
{-# LANGUAGE ForeignFunctionInterface #-}
foreign import ccall unsafe "hello_a" helloA :: IO ()
hello world A
hello world B
hello world A
#include <stdio.h>
#include <stdbool.h>
static bool flag_a = false;
extern void hello_b();
void hello_a() {
if (! flag_a) {
flag_a = true;
hello_b();
}
printf("hello world A\n");
}
#include <stdio.h>
#include <stdbool.h>
static bool flag_b = false;
extern void hello_a();
void hello_b() {
if (! flag_b) {
flag_b = true;
hello_a();
}
printf("hello world B\n");
}
test('T13786', normal, makefile_test, [])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment