diff options
Diffstat (limited to 'test/Sema/compare.c')
-rw-r--r-- | test/Sema/compare.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/compare.c b/test/Sema/compare.c index 7c8c36f..631b694 100644 --- a/test/Sema/compare.c +++ b/test/Sema/compare.c @@ -282,3 +282,8 @@ int test5(unsigned int x) { && (x >= 0) // expected-warning {{comparison of unsigned expression >= 0 is always true}} && (0 <= x); // expected-warning {{comparison of 0 <= unsigned expression is always true}} } + +int test6(unsigned i, unsigned power) { + unsigned x = (i < (1 << power) ? i : 0); + return x != 3 ? 1 << power : i; +} |