// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9 -analyzer-checker=core,osx -verify -fblocks %s
// expected-no-diagnostics
// Test handling of OSAtomicCompareAndSwap when C++ inserts "no-op" casts and we
// do a forced load and binding to the environment on an expression that would regularly
// not have an environment binding. This previously triggered a crash (<rdar://problem/9339920>).
// NOTE: It is critical that the function called is OSAtomicCompareAndSwapIntBarrier.
bool ;
static int _rdar9339920_x = 0;
int ;
int