File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -2609,9 +2609,6 @@ class FirConverter : public Fortran::lower::AbstractConverter {
2609
2609
2610
2610
if (e->isA <Fortran::parser::NonLabelDoStmt>())
2611
2611
e->dirs .push_back (&dir);
2612
- else
2613
- fir::emitFatalError (toLocation (),
2614
- " loop directive must appear before a loop" );
2615
2612
}
2616
2613
2617
2614
void genFIR (const Fortran::parser::CompilerDirective &dir) {
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ void CanonicalizationOfDirectives::CheckLoopDirective(
104
104
std::string s{parser::ToUpperCaseLetters (dir.source .ToString ())};
105
105
s.pop_back (); // Remove trailing newline from source string
106
106
messages_.Say (
107
- dir.source , " A DO loop must follow the %s directive" _err_en_US , s);
107
+ dir.source , " A DO loop must follow the %s directive" _warn_en_US , s);
108
108
}
109
109
}
110
110
Original file line number Diff line number Diff line change 1
- ! RUN: %python %S/test_errors.py %s %flang
1
+ ! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror
2
2
3
3
subroutine empty
4
- ! ERROR : A DO loop must follow the VECTOR ALWAYS directive
4
+ ! WARNING : A DO loop must follow the VECTOR ALWAYS directive
5
5
! dir$ vector always
6
6
end subroutine empty
7
7
8
8
subroutine non_do
9
- ! ERROR : A DO loop must follow the VECTOR ALWAYS directive
9
+ ! WARNING : A DO loop must follow the VECTOR ALWAYS directive
10
10
! dir$ vector always
11
11
a = 1
12
12
end subroutine non_do
13
13
14
14
subroutine execution_part
15
15
do i= 1 ,10
16
- ! ERROR : A DO loop must follow the VECTOR ALWAYS directive
16
+ ! WARNING : A DO loop must follow the VECTOR ALWAYS directive
17
17
! dir$ vector always
18
18
end do
19
19
end subroutine execution_part
You can’t perform that action at this time.
0 commit comments