aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-07-22 19:11:45 +0200
committerTristan Gingold <tgingold@free.fr>2021-07-22 19:11:45 +0200
commit6d3afeff669e11fedb2680b8e4e3bd9ef3d74576 (patch)
treea92a193d4e0eae364ceabe7fbf23ac55b2ac105f /testsuite
parent0a6a66383e576a1b3a14d6b3318ee91daf6923f5 (diff)
downloadghdl-6d3afeff669e11fedb2680b8e4e3bd9ef3d74576.tar.gz
ghdl-6d3afeff669e11fedb2680b8e4e3bd9ef3d74576.tar.bz2
ghdl-6d3afeff669e11fedb2680b8e4e3bd9ef3d74576.zip
testsuite/gna: add a C reproducer for #1817
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue1817/repro2.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/gna/issue1817/repro2.c b/testsuite/gna/issue1817/repro2.c
new file mode 100644
index 000000000..bc9c39b5c
--- /dev/null
+++ b/testsuite/gna/issue1817/repro2.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+
+#ifdef SECOND
+ printf ("second\n");
+}
+
+int main(void)
+{
+ func();
+}
+#endif
+#ifdef FIRST
+int func(void)
+{
+ printf ("first\n");
+#endif
+
+#if !defined(FIRST) && !defined(SECOND)
+#define FIRST
+#include "repro2.c"
+#undef FIRST
+#define SECOND
+#include "repro2.c"
+#endif