On Monday 31 of August 2009 00:32:02 Stephen Hemminger wrote: > I was checking up on some enum issues and tried running the following: > sparse -Wenum-mismatch enum.c > It dies here: > gdb) run -Wenum-mismatch e.c > Starting program: /home/shemminger/src/sparse/sparse -Wenum-mismatch enum.c > > Program received signal SIGSEGV, Segmentation fault. > 0x0805c81d in linearize_store_gen (ep=0xb7e7600c, value=0xb7e4e00c, > ad=0xbfd43134) at linearize.h:293 > 293 return (p && p->type != PSEUDO_VOID && p->type != PSEUDO_VAL); > (gdb) where > #0 0x0805c81d in linearize_store_gen (ep=0xb7e7600c, value=0xb7e4e00c, > ad=0xbfd43134) at linearize.h:293 > #1 0x080609da in linearize_symbol (sym=0xb7e244cc) at linearize.c:1526 > #2 0x080494bd in main (argc=-1209907772, argv=0xb7e245c4) at sparse.c:266 > ------ > #include <stdio.h> > > enum x { A, B, C }; > > static enum x foo(int n) { > return (n > 0) ? A : B; > } > > int main(int ac, char **av) { > int x = foo(ac); > enum x y = 99; > > printf("%d %d\n", x, y); > return 0; > } I am unable to reproduce the crash, tested with sparse 0.4.1 and current git HEAD. Even no suspicious place reported by valgrind. Maybe your <stdio.h> is the trigger. Could you please attach the preprocessed code? Kamil -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html