diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-06-06 16:41:08 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-06-06 16:41:08 +0000 |
commit | 9b07b7b099ceed6f2ac98eb157fc213302b65b07 (patch) | |
tree | aff162bd133fd2610128193135563a6c314c8738 /clang/test/CodeGen/struct-init.c | |
parent | f7647e432cb1d87fb325b3302542690916fe448d (diff) | |
download | bcm5719-llvm-9b07b7b099ceed6f2ac98eb157fc213302b65b07.tar.gz bcm5719-llvm-9b07b7b099ceed6f2ac98eb157fc213302b65b07.zip |
implement constant expr. sub ptr ptr
llvm-svn: 52049
Diffstat (limited to 'clang/test/CodeGen/struct-init.c')
-rw-r--r-- | clang/test/CodeGen/struct-init.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGen/struct-init.c b/clang/test/CodeGen/struct-init.c new file mode 100644 index 00000000000..5b815de3998 --- /dev/null +++ b/clang/test/CodeGen/struct-init.c @@ -0,0 +1,13 @@ +// RUN: clang %s -emit-llvm + +typedef struct _zend_ini_entry zend_ini_entry; +struct _zend_ini_entry { + void *mh_arg1; +}; + +char a; + +const zend_ini_entry ini_entries[] = { + { ((char*)&((zend_ini_entry*)0)->mh_arg1 - (char*)(void*)0)}, + { ((long long*)&a - (long long*)(void*)2)}, +}; |