aboutsummaryrefslogtreecommitdiffstats
path: root/test/export/annotations.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2021-09-16 14:54:22 +0200
committerXavier Leroy <xavier.leroy@college-de-france.fr>2021-09-22 16:06:39 +0200
commitdffc9885e54f9c68af23ec79023dfe8516a4cc32 (patch)
treef7a3755303b6a14b039d90f335d4b860da93ac1e /test/export/annotations.c
parentd32955030937937706b71a96dc6584800f0b8722 (diff)
downloadcompcert-kvx-dffc9885e54f9c68af23ec79023dfe8516a4cc32.tar.gz
compcert-kvx-dffc9885e54f9c68af23ec79023dfe8516a4cc32.zip
Add support to clightgen for generating Csyntax AST as .v files
As proposed in #404. This is presented as a new option `-clight` to the existing `clightgen` tool. Revise clightgen testing to test the Csyntax output in addition to the Clight output.
Diffstat (limited to 'test/export/annotations.c')
-rw-r--r--test/export/annotations.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/export/annotations.c b/test/export/annotations.c
new file mode 100644
index 00000000..993fa7d0
--- /dev/null
+++ b/test/export/annotations.c
@@ -0,0 +1,8 @@
+int f(int x, long y)
+{
+#if !defined(SYSTEM_macos) && !defined(SYSTEM_cygwin)
+ __builtin_ais_annot("x is %e1, y is %e2", x, y);
+#endif
+ __builtin_annot("x is %1, y is %2", x, y);
+ return __builtin_annot_intval("x was here: %1", x);
+}