llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Compiler crash with LLVM15 when parsing some omp constructs

Open mgabka opened this issue 4 years ago • 6 comments

I noticed that LLVM15 based clang crashes when compiling a simple code:

class A {
  void a() {
    #pragma omp parallel
    a(b);
  }
};

When compiler with assertions is used, I am seeing an assertion failure from:

llvm-project/clang/lib/Sema/SemaOpenMP.cpp:1229: const clang::ValueDecl* getCanonicalDecl(const clang::ValueDecl*): Assertion `FD' failed.

a bit of bisecting pointed me to a commit https://reviews.llvm.org/D127803.

When I revert it, clang correctly reports error: error: use of undeclared identifier 'b'.

mgabka avatar Aug 02 '22 16:08 mgabka

@llvm/issue-subscribers-clang-frontend

llvmbot avatar Aug 02 '22 16:08 llvmbot

@llvm/issue-subscribers-openmp

llvmbot avatar Aug 02 '22 16:08 llvmbot

Fix in https://reviews.llvm.org/D131024

jyu2-git avatar Aug 03 '22 16:08 jyu2-git

/cherry-pick a7bca18

tru avatar Aug 07 '22 13:08 tru

/branch llvm/llvm-project-release-prs/issue56884

llvmbot avatar Aug 07 '22 13:08 llvmbot

/pull-request llvm/llvm-project-release-prs#68

llvmbot avatar Aug 07 '22 13:08 llvmbot