summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/intrinsics.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.dg/intrinsics.d')
-rw-r--r--gcc/testsuite/gdc.dg/intrinsics.d36
1 files changed, 20 insertions, 16 deletions
diff --git a/gcc/testsuite/gdc.dg/intrinsics.d b/gcc/testsuite/gdc.dg/intrinsics.d
index d9ccc0ec5ce..dca40d2cf69 100644
--- a/gcc/testsuite/gdc.dg/intrinsics.d
+++ b/gcc/testsuite/gdc.dg/intrinsics.d
@@ -35,22 +35,6 @@ ulong test_bswap(ulong a) { return bswap(a); }
int test_popcnt(uint a) { return popcnt(a); }
// { dg-final { scan-tree-dump " __builtin_popcount(l|ll) " "original" } }
int test_popcnt(ulong a) { return popcnt(a); }
-// { dg-final { scan-tree-dump "\\(volatile ubyte \\*\\) a;" "original" } }
-ubyte test_volatileLoad(ubyte *a) { return volatileLoad(a); }
-// { dg-final { scan-tree-dump "\\(volatile ushort \\*\\) a;" "original" } }
-ushort test_volatileLoad(ushort *a) { return volatileLoad(a); }
-// { dg-final { scan-tree-dump "\\(volatile uint \\*\\) a;" "original" } }
-uint test_volatileLoad(uint *a) { return volatileLoad(a); }
-// { dg-final { scan-tree-dump "\\(volatile ulong \\*\\) a;" "original" } }
-ulong test_volatileLoad(ulong *a) { return volatileLoad(a); }
-// { dg-final { scan-tree-dump "\\(volatile ubyte \\*\\) a = b" "original" } }
-void test_volatileStore(ubyte *a, ubyte b) { return volatileStore(a, b); }
-// { dg-final { scan-tree-dump "\\(volatile ushort \\*\\) a = b" "original" } }
-void test_volatileStore(ushort *a, ushort b) { return volatileStore(a, b); }
-// { dg-final { scan-tree-dump "\\(volatile uint \\*\\) a = b" "original" } }
-void test_volatileStore(uint *a, uint b) { return volatileStore(a, b); }
-// { dg-final { scan-tree-dump "\\(volatile ulong \\*\\) a = b" "original" } }
-void test_volatileStore(ulong *a, ulong b) { return volatileStore(a, b); }
// { dg-final { scan-tree-dump " a r<< b;" "original" } }
ubyte test_rol(ubyte a, uint b) { return rol!ubyte(a, b); }
// { dg-final { scan-tree-dump " a r>> 31;" "original" } }
@@ -141,6 +125,26 @@ real test_toPrecl(double a) { return toPrec!real(a); }
real test_toPrecl(real a) { return toPrec!real(a); }
//////////////////////////////////////////////////////
+// core.volatile
+
+// { dg-final { scan-tree-dump "\\(volatile ubyte \\*\\) a;" "original" } }
+ubyte test_volatileLoad(ubyte *a) { return volatileLoad(a); }
+// { dg-final { scan-tree-dump "\\(volatile ushort \\*\\) a;" "original" } }
+ushort test_volatileLoad(ushort *a) { return volatileLoad(a); }
+// { dg-final { scan-tree-dump "\\(volatile uint \\*\\) a;" "original" } }
+uint test_volatileLoad(uint *a) { return volatileLoad(a); }
+// { dg-final { scan-tree-dump "\\(volatile ulong \\*\\) a;" "original" } }
+ulong test_volatileLoad(ulong *a) { return volatileLoad(a); }
+// { dg-final { scan-tree-dump "\\(volatile ubyte \\*\\) a = b" "original" } }
+void test_volatileStore(ubyte *a, ubyte b) { return volatileStore(a, b); }
+// { dg-final { scan-tree-dump "\\(volatile ushort \\*\\) a = b" "original" } }
+void test_volatileStore(ushort *a, ushort b) { return volatileStore(a, b); }
+// { dg-final { scan-tree-dump "\\(volatile uint \\*\\) a = b" "original" } }
+void test_volatileStore(uint *a, uint b) { return volatileStore(a, b); }
+// { dg-final { scan-tree-dump "\\(volatile ulong \\*\\) a = b" "original" } }
+void test_volatileStore(ulong *a, ulong b) { return volatileStore(a, b); }
+
+//////////////////////////////////////////////////////
// core.stdc.stdarg
// { dg-final { scan-tree-dump-not " va_arg " "original" } }