diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-20 23:50:22 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-20 23:50:22 +0000 |
commit | 8162d4ad319d309be3ede9cefc0bd9870396b87f (patch) | |
tree | 01fe4ac6fd5e4b223e8c02240f50544a45d03681 /clang/test/CodeGen/conditional-gnu-ext.c | |
parent | f86e4da7ae8084261d95565568354b92e5790373 (diff) | |
download | bcm5719-llvm-8162d4ad319d309be3ede9cefc0bd9870396b87f.tar.gz bcm5719-llvm-8162d4ad319d309be3ede9cefc0bd9870396b87f.zip |
Implements in IRgen gnu extensions missing LHS for
complex conditionals. Radar 8453812.
llvm-svn: 114376
Diffstat (limited to 'clang/test/CodeGen/conditional-gnu-ext.c')
-rw-r--r-- | clang/test/CodeGen/conditional-gnu-ext.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGen/conditional-gnu-ext.c b/clang/test/CodeGen/conditional-gnu-ext.c index 5e5801af93c..2e32d3a0166 100644 --- a/clang/test/CodeGen/conditional-gnu-ext.c +++ b/clang/test/CodeGen/conditional-gnu-ext.c @@ -19,3 +19,18 @@ void test1 () { if (x != y) abort(); } + +// rdar://8453812 +_Complex int getComplex(_Complex int val) { + static int count; + if (count++) + abort(); + return val; +} + +_Complex int complx() { + _Complex int cond; + _Complex int rhs; + + return getComplex(1+2i) ? : rhs; +} |