diff options
| author | Anton Korobeynikov <asl@math.spbu.ru> | 2014-11-14 22:09:15 +0000 |
|---|---|---|
| committer | Anton Korobeynikov <asl@math.spbu.ru> | 2014-11-14 22:09:15 +0000 |
| commit | 5f951ee8bd723d5fcfeacf6d79b4ebf074069f85 (patch) | |
| tree | aa5abbcc170b2a7be5446a677f65d6483edc18c4 /clang/test/CodeGen/complex.c | |
| parent | d38341e9425599d0d1e80310cd9da97e2da1d708 (diff) | |
| download | bcm5719-llvm-5f951ee8bd723d5fcfeacf6d79b4ebf074069f85.tar.gz bcm5719-llvm-5f951ee8bd723d5fcfeacf6d79b4ebf074069f85.zip | |
Recommit r222044 with a test fix - it does not make sense to hunt
for a typedef before arithmetic conversion in all rare corner cases.
llvm-svn: 222049
Diffstat (limited to 'clang/test/CodeGen/complex.c')
| -rw-r--r-- | clang/test/CodeGen/complex.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGen/complex.c b/clang/test/CodeGen/complex.c index 206db253caa..1c0e7cb2ee9 100644 --- a/clang/test/CodeGen/complex.c +++ b/clang/test/CodeGen/complex.c @@ -98,3 +98,19 @@ void t8() { const _Complex double test9const = 0; _Complex double test9func() { return test9const; } + +// D6217 +void t91() { + // Check for proper type promotion of conditional expression + char c[(int)(sizeof(typeof((0 ? 2.0f : (_Complex double) 2.0f))) - sizeof(_Complex double))]; + // Check for proper codegen + (0 ? 2.0f : (_Complex double) 2.0f); +} + +void t92() { + // Check for proper type promotion of conditional expression + char c[(int)(sizeof(typeof((0 ? (_Complex double) 2.0f : 2.0f))) - sizeof(_Complex double))]; + // Check for proper codegen + (0 ? (_Complex double) 2.0f : 2.0f); +} + |

