aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/alignas-0.c3
-rw-r--r--test/alignas-0.qbe3
-rw-r--r--test/alignas-type.c1
-rw-r--r--test/alignas-type.qbe1
-rw-r--r--test/alignas.c2
-rw-r--r--test/alignas.qbe2
6 files changed, 10 insertions, 2 deletions
diff --git a/test/alignas-0.c b/test/alignas-0.c
new file mode 100644
index 0000000..402e7ee
--- /dev/null
+++ b/test/alignas-0.c
@@ -0,0 +1,3 @@
+_Alignas(0) int x;
+_Alignas(8) _Alignas(0) int y;
+_Alignas(0) _Alignas(16) int z;
diff --git a/test/alignas-0.qbe b/test/alignas-0.qbe
new file mode 100644
index 0000000..849fb58
--- /dev/null
+++ b/test/alignas-0.qbe
@@ -0,0 +1,3 @@
+export data $x = align 4 { z 4 }
+export data $y = align 8 { z 4 }
+export data $z = align 16 { z 4 }
diff --git a/test/alignas-type.c b/test/alignas-type.c
new file mode 100644
index 0000000..394045d
--- /dev/null
+++ b/test/alignas-type.c
@@ -0,0 +1 @@
+_Alignas(int) char x[4];
diff --git a/test/alignas-type.qbe b/test/alignas-type.qbe
new file mode 100644
index 0000000..7cf0e40
--- /dev/null
+++ b/test/alignas-type.qbe
@@ -0,0 +1 @@
+export data $x = align 4 { z 4 }
diff --git a/test/alignas.c b/test/alignas.c
index 394045d..b714d37 100644
--- a/test/alignas.c
+++ b/test/alignas.c
@@ -1 +1 @@
-_Alignas(int) char x[4];
+_Alignas(8) int x;
diff --git a/test/alignas.qbe b/test/alignas.qbe
index 7cf0e40..6dd5505 100644
--- a/test/alignas.qbe
+++ b/test/alignas.qbe
@@ -1 +1 @@
-export data $x = align 4 { z 4 }
+export data $x = align 8 { z 4 }