http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51667
--- Comment #11 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-24 13:36:43 UTC --- Testcase: --cut here-- void abort (void); void __attribute__((noinline)) bar (int a) { if (a != -1) abort (); } void __attribute__((noinline)) foo (short *a, int t) { unsigned int r = *a; if (t) bar ((unsigned short) r); else bar ((signed short) r); } short v = -1; int main() { foo (&v, 0); return 0; } --cut here-- Fails also on x86_64-pc-linux-gnu. $ ~/gcc-build/gcc/xgcc -B ~/gcc-build/gcc -O2 -free pr51667.c $ ./a.out Aborted $ ~/gcc-build/gcc/xgcc -B ~/gcc-build/gcc -O2 -fno-ree pr51667.c $ ./a.out $