summaryrefslogtreecommitdiffstats
path: root/libacc/tests/data/assignment.c
diff options
context:
space:
mode:
Diffstat (limited to 'libacc/tests/data/assignment.c')
-rw-r--r--libacc/tests/data/assignment.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libacc/tests/data/assignment.c b/libacc/tests/data/assignment.c
new file mode 100644
index 0000000..4fc7801
--- /dev/null
+++ b/libacc/tests/data/assignment.c
@@ -0,0 +1,9 @@
+int main() {
+ int a = 0;
+ int b = 1;
+ a = b = 2; // Test that "b = 2" generates an rvalue.
+ if (a = 7) { // Test that a = 7 generates an rvalue.
+ b = 3;
+ }
+ return a;
+}