bjope added a comment.

I think you can create an upstream test case by looking at 
`clang/test/Analysis/ptr.cl`.
It uses amdgcn and address space 256, which seems to have a different pointer 
size compared to address space zero for that specific target.

So the test case (named with a .cl extension) would look like this (I don't 
think you really need to specify verde as target cpu):

  // RUN: %clang_analyze_cc1 -triple amdgcn-unknown-unknown -target-cpu verde 
-analyze -analyzer-checker=core %s
  
  void test(__attribute__((address_space(256))) int * p) {
    __attribute__((address_space(256))) int * q = p-1;
    if (q) {}
    if (q) {} // crash
    (void)q;
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105974/new/

https://reviews.llvm.org/D105974

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to