benshi001 added a comment.

clang crashes when compling some c++ for for AVR targets with `clang++ test.cc 
--target=avr -mmcu=atmega328 -S`, and the test.cc is

  volatile char *p = (volatile char *) 0x4000;
  class test {
          int v;
  public:
          test(int q): v(q) {}
          int get(void) { return v; }
          ~test() { *p = v; }
  };
  test obj(4);

The crash information shows that there is an derefference of an empty pointer 
in `AVRTargetCodeGenInfo::getGlobalVarAddressSpace`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118445

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

Reply via email to