[flang][NFC] Verify C781 from - Clause 7 constraint checks for f18.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D84503
This commit is contained in:
sameeran joshi 2020-07-24 12:25:32 +05:30 committed by Sameeran joshi
parent 19bc9ea480
commit b752a8ca49
3 changed files with 3 additions and 3 deletions

View file

@ -1547,7 +1547,7 @@ bool AttrsVisitor::IsConflictingAttr(Attr attrName) {
return HaveAttrConflict(attrName, Attr::INTENT_IN, Attr::INTENT_INOUT) ||
HaveAttrConflict(attrName, Attr::INTENT_IN, Attr::INTENT_OUT) ||
HaveAttrConflict(attrName, Attr::INTENT_INOUT, Attr::INTENT_OUT) ||
HaveAttrConflict(attrName, Attr::PASS, Attr::NOPASS) ||
HaveAttrConflict(attrName, Attr::PASS, Attr::NOPASS) || // C781
HaveAttrConflict(attrName, Attr::PURE, Attr::IMPURE) ||
HaveAttrConflict(attrName, Attr::PUBLIC, Attr::PRIVATE) ||
HaveAttrConflict(attrName, Attr::RECURSIVE, Attr::NON_RECURSIVE);

View file

@ -1,6 +1,6 @@
! RUN: %S/test_errors.sh %s %t %f18
! Confirm enforcement of constraints and restrictions in 7.5.7.3
! and C733, C734 and C779, C780, C781, C782, C783, C784, and C785.
! and C733, C734 and C779, C780, C782, C783, C784, and C785.
module m
!ERROR: An ABSTRACT derived type must be extensible

View file

@ -26,7 +26,7 @@ module m
!WARNING: Attribute 'PASS' cannot be used more than once
procedure(subPass), pass, deferred, pass :: passBinding
!ERROR: Attributes 'PASS' and 'NOPASS' conflict with each other
procedure(subPassNopass), pass, deferred, nopass :: passNopassBinding
procedure(subPassNopass), pass, deferred, nopass :: passNopassBinding ! C781
end type boundProcType
contains