From 3e40a17befddbdf9f96d7f7299d31f88376093dc Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Sat, 9 Mar 2019 19:16:01 +0100 Subject: program for testing volatiles --- test/monniaux/volatile/volatile.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/monniaux/volatile/volatile.c (limited to 'test/monniaux/volatile/volatile.c') diff --git a/test/monniaux/volatile/volatile.c b/test/monniaux/volatile/volatile.c new file mode 100644 index 00000000..75f8ce3b --- /dev/null +++ b/test/monniaux/volatile/volatile.c @@ -0,0 +1,32 @@ +#include +#include +#include + +#define VOLATILE volatile + +typedef unsigned data; + +static data powm(data x, unsigned e, data m) { + data y = 1; + for(unsigned i=0; i