aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/nullptr.c4
-rw-r--r--test/nullptr.qbe3
2 files changed, 7 insertions, 0 deletions
diff --git a/test/nullptr.c b/test/nullptr.c
new file mode 100644
index 0000000..8f5b436
--- /dev/null
+++ b/test/nullptr.c
@@ -0,0 +1,4 @@
+typeof(nullptr) x = 0;
+_Static_assert(sizeof x == sizeof(char *));
+int *y = nullptr;
+bool z = nullptr;
diff --git a/test/nullptr.qbe b/test/nullptr.qbe
new file mode 100644
index 0000000..c805942
--- /dev/null
+++ b/test/nullptr.qbe
@@ -0,0 +1,3 @@
+export data $x = align 8 { l 0, }
+export data $y = align 8 { l 0, }
+export data $z = align 1 { b 0, }