Coerce R0 to destination type before storing it into a variable.
diff --git a/libacc/tests/data/floatdouble.c b/libacc/tests/data/floatdouble.c
new file mode 100644
index 0000000..264c641
--- /dev/null
+++ b/libacc/tests/data/floatdouble.c
@@ -0,0 +1,9 @@
+int main()
+{
+    // Test coercing values when storing.
+    float a = 0.002;
+    double b = 0.1f;
+    int c = 10.002;
+    printf("%g %g %d\n", a, b, c);
+    return 0;
+}
diff --git a/libacc/tests/test.py b/libacc/tests/test.py
index 8e4795f..909886d 100644
--- a/libacc/tests/test.py
+++ b/libacc/tests/test.py
@@ -283,6 +283,9 @@
         self.compileCheck(["-R", "data/rollo3.c"], """Executing compiled code:
 result: 10""", """""")
 
+    def testFloatDouble(self):
+        self.compileCheck(["-R", "data/floatdouble.c"], """Executing compiled code:
+result: 0""", """0.002 0.1 10""")
 
 
 if __name__ == '__main__':