Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flang/test/Semantics/OpenACC/acc-atomic-validity.f90
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ program openacc_atomic_validity

!$acc atomic read
i = c(i)

!$acc atomic read if(.true.)
i = c(i)

!$acc atomic read
i = c(i)
!$acc end atomic

!$acc atomic read if(l)
!$acc atomic read if(l)
i = c(i)
!$acc end atomic

!ERROR: FINALIZE clause is not allowed on the ATOMIC READ FINALIZE IF(L)
!$acc atomic read finalize if(l)
!$acc atomic read finalize if(l)
i = c(i)
!$acc end atomic

Expand All @@ -65,7 +65,7 @@ program openacc_atomic_validity
c(1) = c(2)
c(1) = c(3)
!$acc end atomic

!ERROR: The assignments in this atomic capture construct do not update a variable and capture either its initial or final value
!$acc atomic capture
c(1) = c(2)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/OpenACC/acc-default-none-function.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ integer function dosomething(res)
dosomething = res + 1
end function
end module

program main
use mm_acc_rout_function
implicit none
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/OpenACC/acc-error.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subroutine test(a, n)
!ERROR: expected OpenACC directive
!$acc p
integer :: i,j

i = 0
!ERROR: expected OpenACC directive
!$acc p
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/OpenACC/acc-parallel.f90
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ end program openacc_parallel_validity
subroutine acc_parallel_default_none
integer :: i, l
real :: a(10,10)
l = 10
l = 10
!$acc parallel default(none)
!$acc loop
!ERROR: The DEFAULT(NONE) clause requires that 'l' must be listed in a data-mapping clause
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Semantics/OpenACC/acc-reduction-validity.f90
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ program openacc_reduction_validity

!ERROR: No explicit type declared for 'xyz'
!$acc parallel reduction(+:xyz)
!$acc end parallel
!$acc end parallel


end program

subroutine sum()
!ERROR: 'sum' is already declared in this scoping unit
integer :: i,sum
integer :: i,sum
sum = 0
!$acc parallel
!ERROR: Only variables are allowed in data clauses on the LOOP directive
Expand Down
3 changes: 1 addition & 2 deletions flang/test/Semantics/allocate14.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! Check for semantic errors in ALLOCATE statements

program allocate14

integer, allocatable :: i1, i2
character(200), allocatable :: msg1, msg2
type t
Expand Down Expand Up @@ -53,4 +53,3 @@ program allocate14
!TODO: ERRMSG variable in DEALLOCATE must not be the variable being deallocated
deallocate(ts, stat=ts(1)%i, errmsg=ts(1)%msg)
end program

2 changes: 1 addition & 1 deletion flang/test/Semantics/bindings01.f90
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module m2
procedure proc
end type child
contains
subroutine proc
subroutine proc
end subroutine
end module m2

Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/collectives05.f90
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ program main
allocate(foo_t :: polymorphic)

! Test all statically verifiable semantic requirements on co_reduce arguments
! Note: We cannot check requirements that relate to "corresponding references."
! Note: We cannot check requirements that relate to "corresponding references."
! References can correspond only if they execute on differing images. A code that
! executes in a single image might be standard-conforming even if the same code
! executing in multiple images is not.
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/data03.f90
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ subroutine CheckObject
DATA(a[i], i = 1, 5) / 5 * 1 /
!C875
!ERROR: Data object variable must not be a function reference
DATA f(1) / 1 /
DATA f(1) / 1 /
!C875
!ERROR: Data object must have constant subscripts
DATA b(ind) / 1 /
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/doconcurrent01.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! RUN: %python %S/test_errors.py %s %flang_fc1
! C1141
! A reference to the procedure IEEE_SET_HALTING_MODE ! from the intrinsic
! A reference to the procedure IEEE_SET_HALTING_MODE ! from the intrinsic
! module IEEE_EXCEPTIONS, shall not ! appear within a DO CONCURRENT construct.
!
! C1137
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/doconcurrent05.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! RUN: %python %S/test_errors.py %s %flang_fc1
! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
! it belongs to that construct or an outer construct.

subroutine do_concurrent_test1(n)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/doconcurrent06.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! RUN: %python %S/test_errors.py %s %flang_fc1
! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
! it belongs to that construct or an outer construct.

subroutine do_concurrent_test1(n)
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/doconcurrent08.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! RUN: %python %S/test_errors.py %s %flang_fc1
! C1140 -- A statement that might result in the deallocation of a polymorphic
! C1140 -- A statement that might result in the deallocation of a polymorphic
! entity shall not appear within a DO CONCURRENT construct.
module m1
! Base type with scalar components
Expand Down
6 changes: 3 additions & 3 deletions flang/test/Semantics/dosemantics05.f90
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ subroutine s1()
p_or_c => c

jvar = 5

! References in this DO CONCURRENT are OK since there's no DEFAULT(NONE)
! locality-spec
associate (avar => ivar)
Expand All @@ -46,7 +46,7 @@ subroutine s1()
mvar = 3.5
end do
end associate

associate (avar => ivar)
!ERROR: DO CONCURRENT step expression may not be zero
do concurrent (i = 1:2:0) default(none) shared(jvar) local(kvar)
Expand Down Expand Up @@ -95,5 +95,5 @@ subroutine s1()
end select

x = 5.0 ! OK, we're not in a DO CONCURRENT

end subroutine s1
2 changes: 1 addition & 1 deletion flang/test/Semantics/dosemantics08.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! RUN: %python %S/test_errors.py %s %flang_fc1
! C1138 --
! C1138 --
! A branch (11.2) within a DO CONCURRENT construct shall not have a branch
! target that is outside the construct.

Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/dosemantics09.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! RUN: %python %S/test_errors.py %s %flang_fc1
!C1129
!C1129
!A variable that is referenced by the scalar-mask-expr of a
!concurrent-header or by any concurrent-limit or concurrent-step in that
!concurrent-header shall not appear in a LOCAL locality-spec in the same DO
Expand Down
6 changes: 3 additions & 3 deletions flang/test/Semantics/dosemantics11.f90
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
! RUN: %python %S/test_errors.py %s %flang_fc1
! C1135 A cycle-stmt shall not appear within a CHANGE TEAM, CRITICAL, or DO
! C1135 A cycle-stmt shall not appear within a CHANGE TEAM, CRITICAL, or DO
! CONCURRENT construct if it belongs to an outer construct.
!
! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
! it belongs to that construct or an outer construct.
!
! C1168 -- An exit-stmt shall not appear within a CHANGE TEAM or CRITICAL
! C1168 -- An exit-stmt shall not appear within a CHANGE TEAM or CRITICAL
! construct if it belongs to an outer construct.

subroutine s1()
Expand Down
28 changes: 14 additions & 14 deletions flang/test/Semantics/dosemantics12.f90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
! limitations under the License.
!
!Section 11.1.7.4.3, paragraph 2 states:
! Except for the incrementation of the DO variable that occurs in step (3),
! Except for the incrementation of the DO variable that occurs in step (3),
! the DO variable shall neither be redefined nor become undefined while the
! DO construct is active.

Expand Down Expand Up @@ -176,101 +176,101 @@ subroutine s7()

integer :: iostatVar, nextrecVar, numberVar, posVar, reclVar, sizeVar

inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
pos=posVar, recl=reclVar, size=sizeVar)

! Redefinition via use in IOSTAT specifier (section 19.6.5, case (10))
do iostatVar = 1,20
print *, "hello"
!ERROR: Cannot redefine DO variable 'iostatvar'
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in IOSTAT specifier (section 19.6.5, case (10))
do concurrent (iostatVar = 1:10)
print *, "hello"
!ERROR: Cannot redefine DO variable 'iostatvar'
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in NEXTREC specifier (section 19.6.5, case (10))
do nextrecVar = 1,20
print *, "hello"
!ERROR: Cannot redefine DO variable 'nextrecvar'
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in NEXTREC specifier (section 19.6.5, case (10))
do concurrent (nextrecVar = 1:10)
print *, "hello"
!ERROR: Cannot redefine DO variable 'nextrecvar'
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in NUMBER specifier (section 19.6.5, case (10))
do numberVar = 1,20
print *, "hello"
!ERROR: Cannot redefine DO variable 'numbervar'
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in NUMBER specifier (section 19.6.5, case (10))
do concurrent (numberVar = 1:10)
print *, "hello"
!ERROR: Cannot redefine DO variable 'numbervar'
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in RECL specifier (section 19.6.5, case (10))
do reclVar = 1,20
print *, "hello"
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
!ERROR: Cannot redefine DO variable 'reclvar'
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in RECL specifier (section 19.6.5, case (10))
do concurrent (reclVar = 1:10)
print *, "hello"
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
!ERROR: Cannot redefine DO variable 'reclvar'
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in POS specifier (section 19.6.5, case (10))
do posVar = 1,20
print *, "hello"
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
!ERROR: Cannot redefine DO variable 'posvar'
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in POS specifier (section 19.6.5, case (10))
do concurrent (posVar = 1:10)
print *, "hello"
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
!ERROR: Cannot redefine DO variable 'posvar'
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in SIZE specifier (section 19.6.5, case (10))
do sizeVar = 1,20
print *, "hello"
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
!ERROR: Cannot redefine DO variable 'sizevar'
pos=posVar, recl=reclVar, size=sizeVar)
end do

! Redefinition via use in SIZE specifier (section 19.6.5, case (10))
do concurrent (sizeVar = 1:10)
print *, "hello"
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
inquire(3, iostat=iostatVar, nextrec=nextrecVar, number=numberVar, &
!ERROR: Cannot redefine DO variable 'sizevar'
pos=posVar, recl=reclVar, size=sizeVar)
end do
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/etime.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ subroutine bad_kind_error(values, time)
!ERROR: Actual argument for 'values=' has bad type or kind 'REAL(8)'
call etime(values, time)
end subroutine bad_kind_error

subroutine bad_args_error(values)
REAL(KIND=4), DIMENSION(2) :: values
!ERROR: missing mandatory 'time=' argument
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/getcwd.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ subroutine bad_kind_error(cwd, status)
!ERROR: Actual argument for 'status=' has bad type or kind 'INTEGER(2)'
call getcwd(cwd, status)
end subroutine bad_kind_error

subroutine bad_args_error()
!ERROR: missing mandatory 'c=' argument
call getcwd()
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Semantics/getdefinition05.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Tests -fget-symbols-sources with BLOCK that contains same variable name as
! Tests -fget-symbols-sources with BLOCK that contains same variable name as
! another in an outer scope.
program main
integer :: x
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Semantics/io11.f90
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ subroutine unformattedWriteProc(dtv,unit,iostat,iomsg)
end module

module m21
! Test read and write defined input/output procedures specified as a
! Test read and write defined input/output procedures specified as a
! type-bound procedure and as a generic for the same derived type with a
! KIND type parameter where they both have the same value
type t(typeParam)
Expand Down Expand Up @@ -647,7 +647,7 @@ subroutine unformattedReadProc1(dtv,unit,iostat,iomsg)
end module

module m24
! Test read and write defined input/output procedures specified as a
! Test read and write defined input/output procedures specified as a
! type-bound procedure and as a generic for the same derived type with a
! LEN type parameter where they are both assumed
type t(typeParam)
Expand Down
12 changes: 6 additions & 6 deletions flang/test/Semantics/kinds02.f90
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
! REQUIRES: x86_64-registered-target
! RUN: %python %S/test_errors.py %s %flang_fc1
! C712 The value of scalar-int-constant-expr shall be nonnegative and
! C712 The value of scalar-int-constant-expr shall be nonnegative and
! shall specify a representation method that exists on the processor.
! C714 The value of kind-param shall be nonnegative.
! C715 The value of kind-param shall specify a representation method that
! C715 The value of kind-param shall specify a representation method that
! exists on the processor.
! C719 The value of scalar-int-constant-expr shall be nonnegative and shall
! C719 The value of scalar-int-constant-expr shall be nonnegative and shall
! specify a representation method that exists on the processor.
! C725 The optional comma in a length-selector is permitted only if no
! C725 The optional comma in a length-selector is permitted only if no
! double-colon separator appears in the typedeclaration- stmt.
! C727 The value of kind-param shall specify a representation method that
! C727 The value of kind-param shall specify a representation method that
! exists on the processor.
! C728 The value of kind-param shall specify a representation method that
! C728 The value of kind-param shall specify a representation method that
! exists on the processor.
!
!ERROR: INTEGER(KIND=0) is not a supported type
Expand Down
Loading