Skip to content
Snippets Groups Projects
Commit ade3db53 authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

testsuite: Test for #13786

parent 1f2fff89
No related branches found
No related tags found
No related merge requests found
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 ()
helloA
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, [])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment