Skip to content

Commit 1a750a9

Browse files
committed
Convert error to warning
1 parent 726fbc4 commit 1a750a9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

flang/lib/Frontend/FrontendActions.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,12 @@ bool CodeGenAction::beginSourceFileAction() {
366366
if (opts.doConcurrentMappingKind != DoConcurrentMappingKind::DCMK_None &&
367367
!isOpenMPEnabled) {
368368
unsigned diagID = ci.getDiagnostics().getCustomDiagID(
369-
clang::DiagnosticsEngine::Error,
369+
clang::DiagnosticsEngine::Warning,
370370
"lowering `do concurrent` loops to OpenMP is only supported if "
371-
"OpenMP is enabled. Enable OpenMP using `-fopenmp`.");
371+
"OpenMP is enabled. Enable OpenMP using `-fopenmp`. `do concurrent` "
372+
"loops will be serialized.");
372373
ci.getDiagnostics().Report(diagID);
373-
return false;
374+
opts.doConcurrentMappingKind = DoConcurrentMappingKind::DCMK_None;
374375
}
375376

376377
if (isOpenMPEnabled) {

flang/test/Transforms/DoConcurrent/command_line_options.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
! BBC: -fdo-concurrent-to-openmp=<string>
99
! BBC-SAME: Try to map `do concurrent` loops to OpenMP [none|host|device]
1010

11-
! RUN: not %flang -fdo-concurrent-to-openmp=host %s 2>&1 \
11+
! RUN: %flang -fdo-concurrent-to-openmp=host %s 2>&1 \
1212
! RUN: | FileCheck %s --check-prefix=OPT
1313

14-
! OPT: error: lowering `do concurrent` loops to OpenMP is only supported if OpenMP is enabled.
14+
! OPT: warning: lowering `do concurrent` loops to OpenMP is only supported if OpenMP is enabled.
1515
! OPT-SAME: Enable OpenMP using `-fopenmp`.
1616

1717
program test_cli

0 commit comments

Comments
 (0)