diff options
Diffstat (limited to 'clang/test/Analysis/idempotent-operations.c')
-rw-r--r-- | clang/test/Analysis/idempotent-operations.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Analysis/idempotent-operations.c b/clang/test/Analysis/idempotent-operations.c index 9281f279980..793e7cd324b 100644 --- a/clang/test/Analysis/idempotent-operations.c +++ b/clang/test/Analysis/idempotent-operations.c @@ -234,3 +234,11 @@ void rdar8601243() { (void) start; } + +float testFloatCast(int i) { + float f = i; + + // Don't crash when trying to create a "zero" float. + return f - f; +} + |