[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 06:02:55 PDT 2022


aaron.ballman added a comment.

Precommit CI on Linux seems to be failing, but I can't quite tell whether the failures are related or not. I suspect they're unrelated, but they're with libomp and other OpenMP tests so it's not fully clear. Can you investigate those?

I tried your patch locally on Windows and it seems to still crash:

  FAIL: Clang :: OpenMP/atomic_messages.cpp (1412 of 15074)
  ******************** TEST 'Clang :: OpenMP/atomic_messages.cpp' FAILED ********************
  Script:
  --
  : 'RUN: at line 1';   f:\source\llvm-project\llvm\out\build\x64-debug\bin\clang.exe -cc1 -internal-isystem f:\source\llvm-project\llvm\out\build\x64-debug\lib\clang\15.0.0\include -nostdsysteminc -verify=expected,omp45 -fopenmp -fopenmp-version=45 -ferror-limit 150 F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp -Wuninitialized
  : 'RUN: at line 2';   f:\source\llvm-project\llvm\out\build\x64-debug\bin\clang.exe -cc1 -internal-isystem f:\source\llvm-project\llvm\out\build\x64-debug\lib\clang\15.0.0\include -nostdsysteminc -verify=expected,omp50 -fopenmp -ferror-limit 150 F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp -Wuninitialized
  : 'RUN: at line 3';   f:\source\llvm-project\llvm\out\build\x64-debug\bin\clang.exe -cc1 -internal-isystem f:\source\llvm-project\llvm\out\build\x64-debug\lib\clang\15.0.0\include -nostdsysteminc -DOMP51 -verify=expected,omp50,omp51 -fopenmp -fopenmp-version=51 -ferror-limit 150 F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp -Wuninitialized
  : 'RUN: at line 5';   f:\source\llvm-project\llvm\out\build\x64-debug\bin\clang.exe -cc1 -internal-isystem f:\source\llvm-project\llvm\out\build\x64-debug\lib\clang\15.0.0\include -nostdsysteminc -verify=expected,omp45 -fopenmp-simd -fopenmp-version=45 -ferror-limit 150 F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp -Wuninitialized
  : 'RUN: at line 6';   f:\source\llvm-project\llvm\out\build\x64-debug\bin\clang.exe -cc1 -internal-isystem f:\source\llvm-project\llvm\out\build\x64-debug\lib\clang\15.0.0\include -nostdsysteminc -verify=expected,omp50 -fopenmp-simd -ferror-limit 150 F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp -Wuninitialized
  : 'RUN: at line 7';   f:\source\llvm-project\llvm\out\build\x64-debug\bin\clang.exe -cc1 -internal-isystem f:\source\llvm-project\llvm\out\build\x64-debug\lib\clang\15.0.0\include -nostdsysteminc -DOMP51 -verify=expected,omp50,omp51 -fopenmp-simd -fopenmp-version=51 -ferror-limit 150 F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp -Wuninitialized
  --
  Exit Code: 3221225477
  
  Command Output (stdout):
  --
  $ ":" "RUN: at line 1"
  $ "f:\source\llvm-project\llvm\out\build\x64-debug\bin\clang.exe" "-cc1" "-internal-isystem" "f:\source\llvm-project\llvm\out\build\x64-debug\lib\clang\15.0.0\include" "-nostdsysteminc" "-verify=expected,omp45" "-fopenmp" "-fopenmp-version=45" "-ferror-limit" "150" "F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp" "-Wuninitialized"
  $ ":" "RUN: at line 2"
  $ "f:\source\llvm-project\llvm\out\build\x64-debug\bin\clang.exe" "-cc1" "-internal-isystem" "f:\source\llvm-project\llvm\out\build\x64-debug\lib\clang\15.0.0\include" "-nostdsysteminc" "-verify=expected,omp50" "-fopenmp" "-ferror-limit" "150" "F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp" "-Wuninitialized"
  $ ":" "RUN: at line 3"
  $ "f:\source\llvm-project\llvm\out\build\x64-debug\bin\clang.exe" "-cc1" "-internal-isystem" "f:\source\llvm-project\llvm\out\build\x64-debug\lib\clang\15.0.0\include" "-nostdsysteminc" "-DOMP51" "-verify=expected,omp50,omp51" "-fopenmp" "-fopenmp-version=51" "-ferror-limit" "150" "F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp" "-Wuninitialized"
  # command stderr:
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  0.      Program arguments: f:\\source\\llvm-project\\llvm\\out\\build\\x64-debug\\bin\\clang.exe -cc1 -internal-isystem f:\\source\\llvm-project\\llvm\\out\\build\\x64-debug\\lib\\clang\\15.0.0\\include -nostdsysteminc -DOMP51 -verify=expected,omp50,omp51 -fopenmp -fopenmp-version=51 -ferror-limit 150 F:\\source\\llvm-project\\clang\\test\\OpenMP\\atomic_messages.cpp -Wuninitialized
  1.      F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp:968:1: at annotation token
  2.      F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp:930:13: parsing function body 'mixed'
  3.      F:\source\llvm-project\clang\test\OpenMP\atomic_messages.cpp:930:13: in compound statement ('{}')
   #0 0x00007ff6c208caab clang::OMPClause::getClauseKind(void) const F:\source\llvm-project\clang\include\clang\AST\OpenMPClause.h:83:0
   #1 0x00007ff6c7492153 `anonymous namespace'::OpenMPAtomicFailChecker::checkSubClause F:\source\llvm-project\clang\lib\Sema\SemaOpenMP.cpp:12069:0
   #2 0x00007ff6c741fc3d clang::Sema::ActOnOpenMPAtomicDirective(class llvm::ArrayRef<class clang::OMPClause *>, class clang::Stmt *, class clang::SourceLocation, class clang::SourceLocation) F:\source\llvm-project\clang\lib\Sema\SemaOpenMP.cpp:12652:0
   #3 0x00007ff6c74130f1 clang::Sema::ActOnOpenMPExecutableDirective(enum llvm::omp::Directive, struct clang::DeclarationNameInfo const &, enum llvm::omp::Directive, class llvm::ArrayRef<class clang::OMPClause *>, class clang::Stmt *, class clang::SourceLocation, class clang::SourceLocation) F:\source\llvm-project\clang\lib\Sema\SemaOpenMP.cpp:6172:0
   #4 0x00007ff6c64e6d78 clang::Parser::ParseOpenMPDeclarativeOrExecutableDirective(enum clang::Parser::ParsedStmtContext, bool) F:\source\llvm-project\clang\lib\Parse\ParseOpenMP.cpp:2932:0
   #5 0x00007ff6c649b8e2 clang::Parser::ParseStatementOrDeclarationAfterAttributes(class llvm::SmallVector<class clang::Stmt *, 32> &, enum clang::Parser::ParsedStmtContext, class clang::SourceLocation *, class clang::ParsedAttributes &) F:\source\llvm-project\clang\lib\Parse\ParseStmt.cpp:413:0
   #6 0x00007ff6c649a572 clang::Parser::ParseStatementOrDeclaration(class llvm::SmallVector<class clang::Stmt *, 32> &, enum clang::Parser::ParsedStmtContext, class clang::SourceLocation *) F:\source\llvm-project\clang\lib\Parse\ParseStmt.cpp:115:0
   #7 0x00007ff6c649def9 clang::Parser::ParseCompoundStatementBody(bool) F:\source\llvm-project\clang\lib\Parse\ParseStmt.cpp:1111:0
   #8 0x00007ff6c64a4dc2 clang::Parser::ParseFunctionStatementBody(class clang::Decl *, class clang::Parser::ParseScope &) F:\source\llvm-project\clang\lib\Parse\ParseStmt.cpp:2382:0
   #9 0x00007ff6c63a642c clang::Parser::ParseFunctionDefinition(class clang::ParsingDeclarator &, struct clang::Parser::ParsedTemplateInfo const &, class clang::Parser::LateParsedAttrList *) F:\source\llvm-project\clang\lib\Parse\Parser.cpp:1407:0
  #10 0x00007ff6c63ee9ac clang::Parser::ParseDeclGroup(class clang::ParsingDeclSpec &, enum clang::DeclaratorContext, class clang::SourceLocation *, struct clang::Parser::ForRangeInit *) F:\source\llvm-project\clang\lib\Parse\ParseDecl.cpp:2098:0
  #11 0x00007ff6c63a5054 clang::Parser::ParseDeclOrFunctionDefInternal(class clang::ParsedAttributes &, class clang::ParsingDeclSpec &, enum clang::AccessSpecifier) F:\source\llvm-project\clang\lib\Parse\Parser.cpp:1158:0
  #12 0x00007ff6c63a4902 clang::Parser::ParseDeclarationOrFunctionDefinition(class clang::ParsedAttributes &, class clang::ParsingDeclSpec *, enum clang::AccessSpecifier) F:\source\llvm-project\clang\lib\Parse\Parser.cpp:1172:0
  #13 0x00007ff6c63a4308 clang::Parser::ParseExternalDeclaration(class clang::ParsedAttributes &, class clang::ParsingDeclSpec *) F:\source\llvm-project\clang\lib\Parse\Parser.cpp:998:0
  #14 0x00007ff6c639e9d9 clang::Parser::ParseTopLevelDecl(class clang::OpaquePtr<class clang::DeclGroupRef> &, enum clang::Sema::ModuleImportState &) F:\source\llvm-project\clang\lib\Parse\Parser.cpp:727:0
  #15 0x00007ff6c639ab40 clang::ParseAST(class clang::Sema &, bool, bool) F:\source\llvm-project\clang\lib\Parse\ParseAST.cpp:162:0
  #16 0x00007ff6c308ae97 clang::ASTFrontendAction::ExecuteAction(void) F:\source\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1137:0
  #17 0x00007ff6c308a84e clang::FrontendAction::Execute(void) F:\source\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1032:0
  #18 0x00007ff6c300f59a clang::CompilerInstance::ExecuteAction(class clang::FrontendAction &) F:\source\llvm-project\clang\lib\Frontend\CompilerInstance.cpp:1033:0
  #19 0x00007ff6c32856d8 clang::ExecuteCompilerInvocation(class clang::CompilerInstance *) F:\source\llvm-project\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:266:0
  #20 0x00007ff6bef3da48 cc1_main(class llvm::ArrayRef<char const *>, char const *, void *) F:\source\llvm-project\clang\tools\driver\cc1_main.cpp:248:0
  #21 0x00007ff6bef26e65 ExecuteCC1Tool F:\source\llvm-project\clang\tools\driver\driver.cpp:317:0
  #22 0x00007ff6bef276fa clang_main(int, char **) F:\source\llvm-project\clang\tools\driver\driver.cpp:388:0
  #23 0x00007ff6bef6859c main F:\source\llvm-project\llvm\out\build\x64-Debug\tools\clang\tools\driver\clang-driver.cpp:11:0
  #24 0x00007ff6c92600b9 invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0
  #25 0x00007ff6c925ff5e __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
  #26 0x00007ff6c925fe1e __scrt_common_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0
  #27 0x00007ff6c926014e mainCRTStartup D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
  #28 0x00007ff826487034 (C:\WINDOWS\System32\KERNEL32.DLL+0x17034)
  #29 0x00007ff828362651 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x52651)
  
  error: command failed with exit status: 3221225477
  
  --
  
  ********************


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

https://reviews.llvm.org/D123235



More information about the llvm-commits mailing list