aboutsummaryrefslogtreecommitdiffstats
path: root/test/regression/volatile2.c
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-07-11 08:30:14 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2016-07-11 08:30:14 +0200
commitd5b86a98560c36fbcb3ab8d2698e09147acda512 (patch)
treef3ab850a1620fa5d3dbbe439998d09de8e0d817d /test/regression/volatile2.c
parentea2d6b70ed06c60dba9ba81cf53883c85fb92068 (diff)
parent3872ce9f9806d9af334b1fde092145edf664d170 (diff)
downloadcompcert-d5b86a98560c36fbcb3ab8d2698e09147acda512.tar.gz
compcert-d5b86a98560c36fbcb3ab8d2698e09147acda512.zip
Merge branch 'master' into add-file
Diffstat (limited to 'test/regression/volatile2.c')
-rw-r--r--test/regression/volatile2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/regression/volatile2.c b/test/regression/volatile2.c
index 3bad6ae2..bd2a93a3 100644
--- a/test/regression/volatile2.c
+++ b/test/regression/volatile2.c
@@ -13,6 +13,7 @@ unsigned char guc;
signed short gss;
unsigned short gus;
int gi;
+unsigned gu;
float gf;
double gd;
long long gll;
@@ -44,6 +45,8 @@ int main()
TEST("global float", float, gf, 0.5, 256.0);
TEST("global double", double, gd, 3.1415, 2.718);
TEST("global long long", long long, gll, 0x123456789ABCDEFLL, 0x789ABCDEF1234567LL);
+ /* Test for unwanted partial constant propagation */
+ *((volatile long long *) &gll) = gu;
return 0;
}