diff options
Diffstat (limited to 'test/CodeGen/complex.c')
-rw-r--r-- | test/CodeGen/complex.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/complex.c b/test/CodeGen/complex.c index 206db253caa4..1c0e7cb2ee95 100644 --- a/test/CodeGen/complex.c +++ b/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); +} + |