On Tue, Mar 14, 2017 at 08:29:46PM +0000, Dibyendu Majumdar wrote: > Hi, > > In the following test case: > > static int once; > static int once = 1; > extern int printf(const char *, ...); > static int value(int *p) > { > return *p; > } > int main(void) > { > return value(&once) == 1 ? 0 : 1; > } > > Sparse-llvm declares the global 'once' twice as there is a check > missing on whether the global has already been defined. Yes, this is a known issue. It's because sparse doesn't do yet the consolidation of declarations. -- Luc -- 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