[PATCH] D102237: [CUDA][HIP] Fix non-ODR-use of static device variable

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 19 16:25:25 PDT 2021


tra added a comment.

In D102237#2769475 <https://reviews.llvm.org/D102237#2769475>, @yaxunl wrote:

> In D102237#2767538 <https://reviews.llvm.org/D102237#2767538>, @tra wrote:
>
>> Here's a slightly simpler reproducer: https://godbolt.org/z/rW6P9e37s
>
> I have a fix for this: https://reviews.llvm.org/D102801

Here's the second regression introduced by this patch. This one triggers an assertion in clang:

  class a {
  public:
    a(char *);
  };
  void b() {
    [](char *c) {
      static a d(c);
      d;
    };
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102237



More information about the cfe-commits mailing list