sparse-llvm incorrect handling of function pointers

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

 



Hi,

This example fails:

extern int (*f) (int);
int main(int argc, const char *argv[]) {
 if (f) {
  return (*f)(6);
 }
}

The linearized output is:

main:
.L0:
        <entry-point>
        load.64     %r1(f) <- 0[f]
        br          %r1(f), .L1, .L3
.L1:
        load        %r3 <- 0[%r1(f)]
        call.32     %r4 <- %r3, $6
        br          .L3
.L3:
        ret.32      %r4

It is the second load that is failing. Am investigating the cause - it
seems something to do with calc_memop_addr().

Regards
Dibyendu
--
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