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

clang assert on the constexpr variable of omp clause is not marked as used

Open jyu2-git opened this issue 5 years ago • 1 comments

Bugzilla Link 50206
Resolution FIXED
Resolved on May 04, 2021 17:06
Version unspecified
OS Linux
Attachments Test to reproduce the problem.
Fixed by commit(s) rG5285748c2c76: Fix assert on the variable which is used in omp clause is not marked

Extended Description

Attached test assert in clang

cmplrllvm-27165>clang -cc1 -fopenmp -fopenmp-version=50 -fopenmp-targets=x86_64-pc-linux-gnu -x c++ -emit-llvm -o - j1.cpp clang: /localdisk2/jyu2/git/llorg/llvm/clang/lib/CodeGen/CGExpr.cpp:2765: clang::CodeGen::LValue clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(const clang::DeclRefExpr*): Assertion `(ND->isUsed(false) || !isa(ND) || E->isNonOdrUse() || !E->getLocation().isValid()) && "Should not use decl without marking it used!"' failed. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: clang -cc1 -fopenmp -fopenmp-version=50 -fopenmp-targets=x86_64-pc-linux-gnu -x c++ -emit-llvm -o - j1.cpp

  1.  <eof> parser at end of file
    
  2.  Per-file LLVM IR generation
    
  3.  j1.cpp:4:6: Generating code for declaration 'test'
    

jyu2-git avatar May 03 '21 16:05 jyu2-git

This is fixed in https://reviews.llvm.org/D101781

jyu2-git avatar May 05 '21 00:05 jyu2-git