[flang][NFC] Strip trailing whitespace from tests (11 of 14)

Only some fortran source files in flang/test/Semantics have been
modified. The remaining files will be cleaned up in subsequent commits.
This commit is contained in:
Tarun Prabhu 2025-12-05 14:15:08 -07:00 committed by GitHub
parent a1eff73a8e
commit b78fd58d22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 50 additions and 51 deletions

View file

@ -37,7 +37,7 @@ program openacc_atomic_validity
!$acc atomic read
i = c(i)
!$acc atomic read if(.true.)
i = c(i)
@ -45,12 +45,12 @@ program openacc_atomic_validity
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
@ -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)

View file

@ -8,7 +8,7 @@ contains
dosomething = res + 1
end function
end module
program main
use mm_acc_rout_function
implicit none

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -2,7 +2,7 @@
! Check for semantic errors in ALLOCATE statements
program allocate14
integer, allocatable :: i1, i2
character(200), allocatable :: msg1, msg2
type t
@ -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

View file

@ -147,7 +147,7 @@ module m2
procedure proc
end type child
contains
subroutine proc
subroutine proc
end subroutine
end module m2

View file

@ -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.

View file

@ -44,7 +44,7 @@ module m
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 /

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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)
@ -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)
@ -95,5 +95,5 @@ subroutine s1()
end select
x = 5.0 ! OK, we're not in a DO CONCURRENT
end subroutine s1

View file

@ -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.

View file

@ -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

View file

@ -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()

View file

@ -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.
@ -176,14 +176,14 @@ 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
@ -191,7 +191,7 @@ subroutine s7()
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
@ -199,7 +199,7 @@ subroutine s7()
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
@ -207,7 +207,7 @@ subroutine s7()
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
@ -215,7 +215,7 @@ subroutine s7()
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
@ -223,14 +223,14 @@ subroutine s7()
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
@ -238,7 +238,7 @@ subroutine s7()
! 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
@ -246,7 +246,7 @@ subroutine s7()
! 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
@ -254,7 +254,7 @@ subroutine s7()
! 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
@ -262,7 +262,7 @@ subroutine s7()
! 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
@ -270,7 +270,7 @@ subroutine s7()
! 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

View file

@ -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

View file

@ -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()

View file

@ -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

View file

@ -521,7 +521,7 @@ contains
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)
@ -647,7 +647,7 @@ contains
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)

View file

@ -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