On Tue March 9 2010 06:43:09 Christopher Li wrote: > On Mon, Mar 8, 2010 at 5:24 PM, Pavel Roskin wrote: > > Hello! > > > > Sparse crashed when checking drivers/net/wireless/ath/ath9k/gpio.c in > > Linux. I could reduce the crash to the following simple program: > > > > enum kind { > > GOOD > > }; > > static void foo(enum kind k) > > { > > } > > static void bar(int ok, int k) > > { > > foo(ok ? GOOD : k); > > } > > Confirm. This is cause by the recent enum-warning patch. Without it the > sparse runs fine. Thank both of you for tacking down the bug! > Let me see if this is some thing easy to fix. It's easy to fix as soon as I understand how EXPR_CONDITIONAL/EXPR_SELECT work in sparse. A fix from scratch is attached, but I'll need more time for testing it and to write some extra test-cases. Kamil