From 6d3afeff669e11fedb2680b8e4e3bd9ef3d74576 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 22 Jul 2021 19:11:45 +0200 Subject: testsuite/gna: add a C reproducer for #1817 --- testsuite/gna/issue1817/repro2.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 testsuite/gna/issue1817/repro2.c (limited to 'testsuite') 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 + +#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 -- cgit v1.2.3