From 8fbe9863a920f6351a13c5a7f0028b8640b9319d Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Mon, 28 Oct 2019 11:20:28 +0100 Subject: clightgen: sanitize names of functions and global variables A "dollar" sign in a function name or a global variable name was producing incorrect Coq identifiers. (Issue #319.) --- test/clightgen/issue319.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/clightgen/issue319.c (limited to 'test/clightgen/issue319.c') diff --git a/test/clightgen/issue319.c b/test/clightgen/issue319.c new file mode 100644 index 00000000..be9f3f7e --- /dev/null +++ b/test/clightgen/issue319.c @@ -0,0 +1,12 @@ +/* Dollar signs in identifiers */ + +int c$d = 42; + +int a$b(int x$$) { + return c$d + x$$; +} + +int main(int argc, const char *argv[]) +{ + return a$b(6); +} -- cgit