Re: sparse-llvm duplicate declarations of data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux