aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/runnable/test24029.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/runnable/test24029.c')
-rw-r--r--gcc/testsuite/gdc.test/runnable/test24029.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/runnable/test24029.c b/gcc/testsuite/gdc.test/runnable/test24029.c
new file mode 100644
index 0000000..145f2c2
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test24029.c
@@ -0,0 +1,23 @@
+// https://issues.dlang.org/show_bug.cgi?id=24029
+
+int x = 0;
+int y = 0;
+
+void a()
+{
+ (__extension__ ({ x += 2; })); // test.a.__dgliteral1
+}
+
+void b()
+{
+ (__extension__ ({ y += 1; })); // test.b.__dgliteral1
+}
+
+int main(void)
+{
+ a();
+ b();
+ __check(x == 2);
+ __check(y == 1);
+ return 0;
+}