diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-07-22 19:11:45 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-07-22 19:11:45 +0200 |
commit | 6d3afeff669e11fedb2680b8e4e3bd9ef3d74576 (patch) | |
tree | a92a193d4e0eae364ceabe7fbf23ac55b2ac105f /testsuite/gna/issue1817 | |
parent | 0a6a66383e576a1b3a14d6b3318ee91daf6923f5 (diff) | |
download | ghdl-6d3afeff669e11fedb2680b8e4e3bd9ef3d74576.tar.gz ghdl-6d3afeff669e11fedb2680b8e4e3bd9ef3d74576.tar.bz2 ghdl-6d3afeff669e11fedb2680b8e4e3bd9ef3d74576.zip |
testsuite/gna: add a C reproducer for #1817
Diffstat (limited to 'testsuite/gna/issue1817')
-rw-r--r-- | testsuite/gna/issue1817/repro2.c | 24 |
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 |