summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/address-space-cast.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-06-07 17:27:51 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-06-07 17:27:51 +0000
commitc53296eb6d97f37fc1326f3ab38c3c811390b838 (patch)
tree93a809c87ee5dcc16bb1c27b43ed7f542c38ff76 /test/CodeGen/address-space-cast.c
parent56d29376459f88dcdbcbf6c9a83c2f77e433f1e2 (diff)
Fix crash with conversion to an address-space-qualified pointer. Bug
reported on cfe-dev by Cédric Venet. Note that I seriously doubt that this perticular construct is useful, though: it's a pointer in an alternate address space pointing into unqualified address space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/address-space-cast.c')
-rw-r--r--test/CodeGen/address-space-cast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/CodeGen/address-space-cast.c b/test/CodeGen/address-space-cast.c
new file mode 100644
index 0000000000..473c8e0e81
--- /dev/null
+++ b/test/CodeGen/address-space-cast.c
@@ -0,0 +1,4 @@
+// RUN: clang -emit-llvm < %s
+
+volatile unsigned char* const __attribute__((address_space(1))) serial_ctrl = 0x02;
+