+! RUN: %S/test_folding.sh %s %flang %t
! Test intrinsic operation folding
+! RUN: %S/test_folding.sh %s %flang %t
! Check intrinsic function folding with host runtime library
module m
+! RUN: %S/test_folding.sh %s %flang %t
! Test operation folding edge case (both expected value and messages)
! These tests make assumptions regarding real(4) and integer(4) extrema.
+! RUN: %S/test_folding.sh %s %flang %t
! Test intrinsic function folding edge case (both expected value and messages)
! These tests make assumptions regarding real(4) extrema.
+! RUN: %S/test_folding.sh %s %flang %t
! Test transformational intrinsic function folding
module m
+! RUN: %S/test_folding.sh %s %flang %t
! Test numeric model inquiry intrinsics
module m
+! RUN: %S/test_folding.sh %s %flang %t
! Test folding of LBOUND and UBOUND
module m
+! RUN: %S/test_folding.sh %s %flang %t
! Test folding of IS_CONTIGUOUS on simply contiguous items (9.5.4)
! When IS_CONTIGUOUS() is constant, it's .TRUE.
-! RUN: ${F18} -fparse-only %s
+! EXEC: ${F18} -fparse-only %s
module mm2a
implicit none
-! RUN: ${F18} -fparse-only %s
+! EXEC: ${F18} -fparse-only %s
module mm2b
use mm2a
i = callget5()
ENDPROGRAM
-! RUN: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
! CHECK:callget5: mm2b
! CHECK:get5: mm2a
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
! Creating a symbol that allocate should accept
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C933_a(b1, ca3, ca4, cp3, cp3mold, cp4, cp7, cp8, bsrc)
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C936(param_ca_4_assumed, param_ta_4_assumed, param_ca_4_deferred)
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C945_a(srca, srcb, srcc, src_complex, src_logical, &
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C946(param_ca_4_assumed, param_ta_4_assumed, param_ca_4_deferred)
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
!TODO: mixing expr and source-expr?
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
! TODO: Function Pointer in allocate and derived types!
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C941_C942b_C950(xsrc, x1, a2, b2, cx1, ca2, cb1, cb2, c1)
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
module not_iso_fortran_env
+! RUN: %S/test_errors.sh %s %flang %t
! Check calls with alt returns
CALL TEST (N, *100, *200 )
+! RUN: %S/test_errors.sh %s %flang %t
! Check subroutine with alt return
SUBROUTINE TEST (N, *, *)
+! RUN: %S/test_errors.sh %s %flang %t
! Check for various alt return error conditions
SUBROUTINE TEST (N, *, *)
+! RUN: %S/test_errors.sh %s %flang %t
! Functions cannot use alt return
REAL FUNCTION altreturn01(X)
+! RUN: %S/test_errors.sh %s %flang %t
! Test extension: RETURN from main program
return !ok
+! RUN: %S/test_errors.sh %s %flang %t
! 10.2.3.1(2) All masks and LHS of assignments in a WHERE must conform
subroutine s1
+! RUN: %S/test_errors.sh %s %flang %t
! Pointer assignment constraints 10.2.2.2
module m1
+! RUN: %S/test_errors.sh %s %flang %t
! Pointer assignment constraints 10.2.2.2 (see also assign02.f90)
module m
+! RUN: %S/test_errors.sh %s %flang %t
! 9.4.5
subroutine s1
type :: t(k, l)
+! RUN: %S/test_errors.sh %s %flang %t
! Forward references to derived types (error cases)
!ERROR: The derived type 'undef' was forward-referenced but not defined
+! RUN: %S/test_errors.sh %s %flang %t
! Confirm enforcement of constraints and restrictions in 7.5.7.3
! and C779-C785.
+! RUN: %S/test_errors.sh %s %flang %t
! Test BLOCK DATA subprogram (14.3)
block data foo
!ERROR: IMPORT is not allowed in a BLOCK DATA subprogram
+! RUN: %S/test_errors.sh %s %flang %t
! C1107 -- COMMON, EQUIVALENCE, INTENT, NAMELIST, OPTIONAL, VALUE or
! STATEMENT FUNCTIONS not allow in specification part
+! RUN: %S/test_errors.sh %s %flang %t
! C1108 -- Save statement in a BLOCK construct shall not conatin a
! saved-entity-list that does not specify a common-block-name
+! RUN: %S/test_errors.sh %s %flang %t
! Tests implemented for this standard:
! Block Construct
! C1109
+! RUN: %S/test_errors.sh %s %flang %t
! Enforce 18.2.3.3
program test
+! RUN: %S/test_errors.sh %s %flang %t
! Confirm enforcement of constraints and restrictions in 15.6.2.1
non_recursive function f01(n) result(res)
+! RUN: %S/test_errors.sh %s %flang %t
! 15.5.1 procedure reference constraints and restrictions
subroutine s01(elem, subr)
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.4 constraints and restrictions for non-POINTER non-ALLOCATABLE
! dummy arguments.
+! RUN: %S/test_errors.sh %s %flang %t
! Test 8.5.10 & 8.5.18 constraints on dummy argument declarations
module m
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.5 constraints and restrictions for POINTER & ALLOCATABLE
! arguments when both sides of the call have the same attributes.
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.6 constraints and restrictions for ALLOCATABLE
! dummy arguments.
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.7 constraints and restrictions for POINTER dummy arguments.
module m
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.8 coarray dummy arguments
module m
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.9(2,3,5) dummy procedure requirements
module m
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.7 (C1583-C1590, C1592-C1599) constraints and restrictions
! for pure procedures.
! (C1591 is tested in call11.f90; C1594 in call12.f90.)
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.7 C1591 & others: contexts requiring pure subprograms
module m
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.7 C1594 - prohibited assignments in pure subprograms
module used
+! RUN: %S/test_errors.sh %s %flang %t
! Test 15.4.2.2 constraints and restrictions for calls to implicit
! interfaces
+! RUN: %S/test_errors.sh %s %flang %t
! Test 8.5.18 constraints on the VALUE attribute
module m
+! RUN: %S/test_errors.sh %s %flang %t
! C711 An assumed-type actual argument that corresponds to an assumed-rank
! dummy argument shall be assumed-shape or assumed-rank.
subroutine s(arg1, arg2, arg3)
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: end do
SUBROUTINE sub00(a,b,n,m)
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: end do
SUBROUTINE sub00(a,b,n,m)
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: 10 continue
! CHECK: end do
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: do [1-9]
! Figure out how to also execute this test.
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
-! XXXRUN: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! XXXEXEC: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: do *[1-9]
program P
-! RUN: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: do *[1-9]
! CHECK: omp simd
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1131
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: A DO loop should terminate with an END DO or CONTINUE
program endDo
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard -I../../tools/f18/include %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard -I../../tools/f18/include %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
+! RUN: %S/test_any.sh %s %flang %t
! Check that if there is a label or a name on an label-do-stmt,
! then it is not lost when rewriting it to an non-label-do-stmt.
-! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
! CHECK: 2 do
+! RUN: %S/test_errors.sh %s %flang %t
! Test selector and team-value in CHANGE TEAM statement
! OK
+! RUN: %S/test_errors.sh %s %flang %t
! C718 Each named constant in a complex literal constant shall be of type
! integer or real.
subroutine s()
+! RUN: %S/test_errors.sh %s %flang %t
! Check that a basic computed goto compiles
INTEGER, DIMENSION (2) :: B
+! RUN: %S/test_errors.sh %s %flang %t
! Check that computed goto express must be a scalar integer expression
! TODO: PGI, for example, accepts a float & converts the value to int.
+! RUN: %S/test_errors.sh %s %flang %t
!C1117
subroutine test1(a, i)
+! RUN: %S/test_errors.sh %s %flang %t
!C1118
subroutine test1
+! RUN: %S/test_errors.sh %s %flang %t
!C1119
subroutine test1(a, i)
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: Control flow escapes from CRITICAL
subroutine test1(a, i)
+! RUN: %S/test_errors.sh %s %flang %t
!Test for checking data constraints, C882-C887
module m1
type person
+! RUN: %S/test_errors.sh %s %flang %t
! Check that expressions are analyzed in data statements
subroutine s1
+! RUN: %S/test_errors.sh %s %flang %t
! Test that DEALLOCATE works
INTEGER, PARAMETER :: maxvalue=1024
+! RUN: %S/test_errors.sh %s %flang %t
! Check for type errors in DEALLOCATE statements
INTEGER, PARAMETER :: maxvalue=1024
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in DEALLOCATE statements
Module share
+! RUN: %S/test_errors.sh %s %flang %t
! C1141
! A reference to the procedure IEEE_SET_HALTING_MODE ! from the intrinsic
! module IEEE_EXCEPTIONS, shall not ! appear within a DO CONCURRENT construct.
+! RUN: %S/test_any.sh %s %flang %t
! negative tests: we don't want DO CONCURRENT semantics constraints checked
! when the loops are not DO CONCURRENT
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: image control statement not allowed in DO CONCURRENT
! CHECK-NOT: RETURN not allowed in DO CONCURRENT
! CHECK-NOT: call to impure procedure in DO CONCURRENT not allowed
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: Control flow escapes from DO CONCURRENT
! CHECK: branch into loop body from outside
! CHECK: the loop branched into
+! RUN: %S/test_any.sh %s %flang %t
! C1122 The index-name shall be a named scalar variable of type integer.
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: Must have INTEGER type, but is REAL\\(4\\)
subroutine do_concurrent_test1(n)
+! RUN: %S/test_errors.sh %s %flang %t
! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
! it belongs to that construct or an outer construct.
+! RUN: %S/test_errors.sh %s %flang %t
! C1167 -- An exit-stmt shall not appear within a DO CONCURRENT construct if
! it belongs to that construct or an outer construct.
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: exit from DO CONCURRENT construct
subroutine do_concurrent_test1(n)
+! RUN: %S/test_errors.sh %s %flang %t
! C1140 -- A statement that might result in the deallocation of a polymorphic
! entity shall not appear within a DO CONCURRENT construct.
module m1
+! RUN: %S/test_errors.sh %s %flang %t
! C1131 -- check valid and invalid DO loop naming
PROGRAM C1131
+! RUN: %S/test_errors.sh %s %flang %t
! C1121 -- any procedure referenced in a concurrent header must be pure
! Also, check that the step expressions are not zero. This is prohibited by
+! RUN: %S/test_errors.sh %s %flang %t
! Issue 458 -- semantic checks for a normal DO loop. The DO variable
! and the initial, final, and step expressions must be INTEGER if the
! options for standard conformance and turning warnings into errors
+! RUN: %S/test_errors.sh %s %flang %t
! C1123 -- Expressions in DO CONCURRENT header cannot reference variables
! declared in the same header
PROGRAM dosemantics04
+! RUN: %S/test_errors.sh %s %flang %t
! Test DO loop semantics for constraint C1130 --
! The constraint states that "If the locality-spec DEFAULT ( NONE ) appears in a
! DO CONCURRENT statement; a variable that is a local or construct entity of a
+! RUN: %S/test_errors.sh %s %flang %t
! C1131, C1133 -- check valid and invalid DO loop naming
! C1131 (R1119) If the do-stmt of a do-construct specifies a do-construct-name,
! the corresponding end-do shall be an end-do-stmt specifying the same
+! RUN: %S/test_errors.sh %s %flang %t
!C1132
! If the do-stmt is a nonlabel-do-stmt, the corresponding end-do shall be an
! end-do-stmt.
+! RUN: %S/test_errors.sh %s %flang %t
! C1138 --
! A branch (11.2) within a DO CONCURRENT construct shall not have a branch
! target that is outside the construct.
+! RUN: %S/test_errors.sh %s %flang %t
!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
+! RUN: %S/test_errors.sh %s %flang %t
! C1134 A CYCLE statement must be within a DO construct
!
! C1166 An EXIT statement must be within a DO construct
+! RUN: %S/test_errors.sh %s %flang %t
! C1135 A cycle-stmt shall not appear within a CHANGE TEAM, CRITICAL, or DO
! CONCURRENT construct if it belongs to an outer construct.
!
+! RUN: %S/test_errors.sh %s %flang %t
! Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
integer i, j
real r(2)
+! RUN: %S/test_errors.sh %s %flang %t
! C1003 - can't parenthesize function call returning procedure pointer
module m1
type :: dt
+! RUN: %S/test_errors.sh %s %flang %t
! Test specification expressions
module m
+! RUN: %S/test_errors.sh %s %flang %t
subroutine forall1
real :: a(9)
!ERROR: 'i' is already declared in this scoping unit
+!RUN: %S/test_any.sh %s %flang %t
! Tests -fget-definition returning source position of symbol definition.
-
module m1
private :: f
contains
end function
end module
-! RUN: echo %t 1>&2;
-! RUN: ${F18} -fget-definition 7 17 18 -fparse-only %s > %t;
-! RUN: ${F18} -fget-definition 8 20 23 -fparse-only %s >> %t;
-! RUN: ${F18} -fget-definition 15 3 4 -fparse-only %s >> %t;
-! RUN: ${F18} -fget-definition -fparse-only %s >> %t 2>&1;
-! RUN: cat %t | ${FileCheck} %s
+! EXEC: echo %t 1>&2;
+! EXEC: ${F18} -fget-definition 7 17 18 -fparse-only %s > %t;
+! EXEC: ${F18} -fget-definition 8 20 23 -fparse-only %s >> %t;
+! EXEC: ${F18} -fget-definition 15 3 4 -fparse-only %s >> %t;
+! EXEC: ${F18} -fget-definition -fparse-only %s >> %t 2>&1;
+! EXEC: cat %t | ${FileCheck} %s
! CHECK:x:.*getdefinition01.f90, 6, 21-22
! CHECK:yyy:.*getdefinition01.f90, 6, 24-27
! CHECK:x:.*getdefinition01.f90, 14, 24-25
+!RUN: %S/test_any.sh %s %flang %t
! Tests -fget-definition with fixed form.
-
module m2
private :: f
contains
end function
end module
-! RUN: ${F18} -fget-definition 8 9 10 -fparse-only %s > %t;
-! RUN: ${F18} -fget-definition 9 26 29 -fparse-only %s >> %t;
-! RUN: ${F18} -fget-definition 16 9 10 -fparse-only %s >> %t;
-! RUN: cat %t | ${FileCheck} %s
+! EXEC: ${F18} -fget-definition 8 9 10 -fparse-only %s > %t;
+! EXEC: ${F18} -fget-definition 9 26 29 -fparse-only %s >> %t;
+! EXEC: ${F18} -fget-definition 16 9 10 -fparse-only %s >> %t;
+! EXEC: cat %t | ${FileCheck} %s
! CHECK:x:.*getdefinition02.f, 6, 27-28
! CHECK:yyy:.*getdefinition02.f, 6, 30-33
! CHECK:x:.*getdefinition02.f, 15, 30-31
! Tests -fget-definition with INCLUDE
-
-INCLUDE "getdefinition03-b.f90"
+!RUN: %S/test_any.sh %s %flang %t
+INCLUDE "Inputs/getdefinition03-b.f90"
program main
use m3
x = f
end program
-! RUN: ${F18} -fget-definition 8 6 7 -fparse-only %s > %t;
-! RUN: ${F18} -fget-definition 8 2 3 -fparse-only %s >> %t;
-! RUN: cat %t | ${FileCheck} %s;
+! EXEC: ${F18} -fget-definition 8 6 7 -fparse-only %s > %t;
+! EXEC: ${F18} -fget-definition 8 2 3 -fparse-only %s >> %t;
+! EXEC: cat %t | ${FileCheck} %s;
! CHECK:f:.*getdefinition03-b.f90, 2, 12-13
! CHECK:x:.*getdefinition03-a.f90, 7, 13-14
+!RUN: %S/test_any.sh %s %flang %t
! Tests -fget-definition with COMMON block with same name as variable.
-
program main
integer :: x
integer :: y
x = y
end program
-! RUN: ${F18} -fget-definition 7 3 4 -fparse-only %s | ${FileCheck} %s
+! EXEC: ${F18} -fget-definition 7 3 4 -fparse-only %s | ${FileCheck} %s
! CHECK:x:.*getdefinition04.f90, 4, 14-15
+!RUN: %S/test_any.sh %s %flang %t
! Tests -fget-symbols-sources with BLOCK that contains same variable name as
! another in an outer scope.
-
program main
integer :: x
integer :: y
end program
!! Inner x
-! RUN: ${F18} -fget-definition 10 5 6 -fparse-only %s > %t;
+! EXEC: ${F18} -fget-definition 10 5 6 -fparse-only %s > %t;
! CHECK:x:.*getdefinition05.f90, 8, 16-17
!! Outer y
-! RUN: ${F18} -fget-definition 12 7 8 -fparse-only %s >> %t;
+! EXEC: ${F18} -fget-definition 12 7 8 -fparse-only %s >> %t;
! CHECK:y:.*getdefinition05.f90, 6, 14-15
-! RUN: cat %t | ${FileCheck} %s;
+! EXEC: cat %t | ${FileCheck} %s;
+!RUN: %S/test_any.sh %s %flang %t
! Tests -fget-symbols-sources finding all symbols in file.
-
module mm1
private :: f
contains
end function
end module
-! RUN: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
! CHECK-ONCE:mm1:.*getsymbols01.f90, 3, 8-11
! CHECK-ONCE:f:.*getsymbols01.f90, 13, 26-27
! CHECK-ONCE:s:.*getsymbols01.f90, 6, 18-19
--- /dev/null
+!RUN: %S/test_any.sh '%S/Inputs/getsymbols02-*' %f18 %t
\ No newline at end of file
! Tests -fget-symbols with INCLUDE
-
-INCLUDE "getsymbols03-b.f90"
+!RUN: %S/test_any.sh %s %flang %t
+INCLUDE "Inputs/getsymbols03-b.f90"
program main
use mm3
x = f
end program
-! RUN: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
! CHECK:mm3:.*getsymbols03-b.f90, 1, 8-11
! CHECK:f:.*getsymbols03-b.f90, 2, 12-13
! CHECK:main:.*getsymbols03-a.f90, 5, 9-13
+!RUN: %S/test_any.sh %s %flang %t
! Tests -fget-symbols-sources with COMMON.
-
program main
integer :: x
integer :: y
x = y
end program
-! RUN: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
! CHECK:x:.*getsymbols04.f90, 4, 14-15
! CHECK:y:.*getsymbols04.f90, 5, 14-15
! CHECK:x:.*getsymbols04.f90, 6, 11-12
+!RUN: %S/test_any.sh %s %flang %t
! Tests -fget-symbols-sources with COMMON.
-
program main
integer :: x
integer :: y
x = y
end program
-! RUN: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
! CHECK:x:.*getsymbols05.f90, 4, 14-15
! CHECK:y:.*getsymbols05.f90, 5, 14-15
! CHECK:x:.*getsymbols05.f90, 7, 16-17
+! RUN: %S/test_errors.sh %s %flang %t
! Check that a basic arithmetic if compiles.
if ( A ) 100, 200, 300
+! RUN: %S/test_errors.sh %s %flang %t
! Check that only labels are allowed in arithmetic if statements.
! TODO: Revisit error message "expected 'ASSIGN'" etc.
! TODO: Revisit error message "expected one of '0123456789'"
+! RUN: %S/test_errors.sh %s %flang %t
!ERROR: label '600' was not found
+! RUN: %S/test_errors.sh %s %flang %t
! Make sure arithmetic if expressions are non-complex numeric exprs.
INTEGER I
+! RUN: %S/test_errors.sh %s %flang %t
! Simple check that if constructs are ok.
if (a < b) then
+! RUN: %S/test_errors.sh %s %flang %t
! Check that if constructs only accept scalar logical expressions.
! TODO: expand the test to check this restriction for more types.
+! RUN: %S/test_errors.sh %s %flang %t
! Simple check that if statements are ok.
IF (A > 0.0) A = LOG (A)
+! RUN: %S/test_errors.sh %s %flang %t
!ERROR: IF statement is not allowed in IF statement
IF (A > 0.0) IF (B < 0.0) A = LOG (A)
END
+! RUN: %S/test_errors.sh %s %flang %t
! Check that non-logical expressions are not allowed.
! Check that non-scalar expressions are not allowed.
! TODO: Insure all non-logicals are prohibited.
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
implicit none
!ERROR: More than one IMPLICIT NONE statement
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
implicit none
!ERROR: IMPLICIT statement after IMPLICIT NONE or IMPLICIT NONE(TYPE) statement
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
implicit integer(a-z)
!ERROR: IMPLICIT NONE statement after IMPLICIT statement
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s
parameter(a=1.0)
!ERROR: IMPLICIT NONE statement after PARAMETER statement
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s
!ERROR: 'a' does not follow 'b' alphabetically
implicit integer(b-a)
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
implicit integer(a-c)
!ERROR: More than one implicit type specified for 'c'
+! RUN: %S/test_errors.sh %s %flang %t
implicit none(external)
external x
call x
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
block
!ERROR: IMPLICIT statement is not allowed in a BLOCK construct
+! RUN: %S/test_errors.sh %s %flang %t
! Object pointer initializer error tests
subroutine test(j)
+! RUN: %S/test_errors.sh %s %flang %t
! Fortran syntax considers signed int literals in complex literals
! to be a distinct production, not an application of unary +/- to
! an unsigned int literal, so they're used here to test overflow
+! RUN: %S/test_errors.sh %s %flang %t
character(len=20) :: access = "direcT"
character(len=20) :: access_(2) = (/"direcT", "streaM"/)
character(len=20) :: action_(2) = (/"reaD ", "writE"/)
+! RUN: %S/test_errors.sh %s %flang %t
integer :: unit10 = 10
integer :: unit11 = 11
+! RUN: %S/test_errors.sh %s %flang %t
character(kind=1,len=50) internal_file
character(kind=2,len=50) internal_file2
character(kind=4,len=50) internal_file4
+! RUN: %S/test_errors.sh %s %flang %t
character(kind=1,len=50) internal_file
character(kind=1,len=100) msg
character(20) sign
+! RUN: %S/test_errors.sh %s %flang %t
character*20 c(25), cv
character(kind=1,len=59) msg
logical*2 v(5), lv
+! RUN: %S/test_errors.sh %s %flang %t
character(kind=1,len=100) msg1
character(kind=2,len=200) msg2
integer(1) stat1
+! RUN: %S/test_errors.sh %s %flang %t
1001 format(A)
!ERROR: Format statement must be labeled
+! RUN: %S/test_errors.sh %s %flang %t
write(*,*)
write(*,'()')
write(*,'(A)')
+! RUN: %S/test_errors.sh %s %flang %t
!ERROR: String edit descriptor in READ format expression
read(*,'("abc")')
+! RUN: %S/test_errors.sh %s %flang %t
!OPTIONS: -Mstandard
write(*, '(B0)')
+! RUN: %S/test_symbols.sh %s %flang %t
!DEF: /MainProgram1/jk1 ObjectEntity INTEGER(1)
integer(kind=1) jk1
!DEF: /MainProgram1/js1 ObjectEntity INTEGER(1)
+! RUN: %S/test_errors.sh %s %flang %t
! 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.
+! RUN: %S/test_symbols.sh %s %flang %t
!DEF: /MainProgram1/ipdt DerivedType
!DEF: /MainProgram1/ipdt/k TypeParam INTEGER(4)
type :: ipdt(k)
+! RUN: %S/test_errors.sh %s %flang %t
! C716 If both kind-param and exponent-letter appear, exponent-letter
! shall be E.
! C717 The value of kind-param shall specify an approximation method that
-! RUN: ${F18} -funparse-with-symbols %s -o /dev/null 2>&1 | grep -v 'procedure conflicts' | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s -o /dev/null 2>&1 | grep -v 'procedure conflicts' | ${FileCheck} %s
! CHECK-NOT: error:[[:space:]]
! FIXME: filter out the array/function syntax issues (procedure conflicts)
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: label '0' is out of range
! CHECK: label '100000' is out of range
! CHECK: label '123456' is out of range
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: DO loop doesn't properly nest
! CHECK: DO loop conflicts
! CHECK: label '30' cannot be found
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: branch into loop body from outside
! CHECK: do 10 i = 1, m
! CHECK: the loop branched into
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: label '50' was not found
! CHECK: label '55' is not in scope
! CHECK: '70' not a branch target
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: label '10' is not in scope
! CHECK: label '20' was not found
! CHECK: '30' not a branch target
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: '30' not a branch target
! CHECK: control flow use of '30'
! CHECK: label '10' is not in scope
+! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: CYCLE construct-name is not in scope
! CHECK: IF construct name unexpected
! CHECK: unnamed IF statement
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: label '60' was not found
subroutine s(a)
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: '60' not a FORMAT
! CHECK: data transfer use of '60'
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: BLOCK DATA subprogram name mismatch
! CHECK: should be
! CHECK: FUNCTION name mismatch
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: expected end of statement
subroutine s
-! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %S/test_any.sh %s %flang %t
+! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: branch into loop body from outside
! CHECK: the loop branched into
+! RUN: %S/test_any.sh %s %flang %t
! Tests implemented for this standard
! 11.1.4 - 4 It is permissible to branch to and end-block-stmt only withinh its
! Block Construct
-! RUN: ${F18} %s 2>&1 | ${FileCheck} %s
+! EXEC: ${F18} %s 2>&1 | ${FileCheck} %s
! CHECK: label '20' is not in scope
subroutine s1
+! RUN: %S/test_errors.sh %s %flang %t
! Miscellaneous constraint and requirement checking on declarations:
! - 8.5.6.2 & 8.5.6.3 constraints on coarrays
! - 8.5.19 constraints on the VOLATILE attribute
+! RUN: %S/test_modfile.sh %s %f18 %t
! Check correct modfile generation for type with private component.
module m
integer :: i
+! RUN: %S/test_modfile.sh %s %f18 %t
! Check modfile generation for private type in public API.
module m
+! RUN: %S/test_modfile.sh %s %f18 %t
! Check modfile generation with use-association.
module m1
+! RUN: %S/test_modfile.sh %s %f18 %t
! modfile with subprograms
module m1
+! RUN: %S/test_modfile.sh %s %f18 %t
! Use-association with VOLATILE or ASYNCHRONOUS
module m1
+! RUN: %S/test_modfile.sh %s %f18 %t
! Check modfile generation for external interface
module m
interface
+! RUN: %S/test_modfile.sh %s %f18 %t
! Check modfile generation for generic interfaces
module m1
interface foo
+! RUN: %S/test_modfile.sh %s %f18 %t
! Check modfile generation for external declarations
module m
real, external :: a
--- /dev/null
+!RUN: %S/test_modfile.sh '%S/Inputs/modfile09-*' %f18 %t
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test writing procedure bindings in a derived type.
module m
+! RUN: %S/test_modfile.sh %s %f18 %t
module m
type t1(a, b, c)
integer, kind :: a
+! RUN: %S/test_modfile.sh %s %f18 %t
module m
integer(8), parameter :: a = 1, b = 2_8
parameter(n=3,l=-3,e=1.0/3.0)
+! RUN: %S/test_modfile.sh %s %f18 %t
module m
character(2) :: z
character(len=3) :: y
+! RUN: %S/test_modfile.sh %s %f18 %t
module m
type t1
contains
+! RUN: %S/test_modfile.sh %s %f18 %t
module m
type :: t
procedure(a), pointer, pass :: c
+! RUN: %S/test_modfile.sh %s %f18 %t
module m
character(2), parameter :: prefix = 'c_'
integer, bind(c, name='c_a') :: a
+! RUN: %S/test_modfile.sh %s %f18 %t
! Tests parameterized derived type instantiation with KIND parameters
module m
+! RUN: %S/test_modfile.sh %s %f18 %t
! Tests folding of array constructors
module m
+! RUN: %S/test_modfile.sh %s %f18 %t
module m
implicit complex(8)(z)
real :: x
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test modfiles for entities with initialization
module m
integer, parameter :: k8 = 8
+! RUN: %S/test_modfile.sh %s %f18 %t
module m
logical b
bind(C) :: /cb2/
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test character length conversions in constructors
module m
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test that subprogram interfaces get all of the symbols that they need.
module m1
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test declarations with coarray-spec
! Different ways of declaring the same coarray.
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test compile-time analysis of shapes.
module m1
+! RUN: %S/test_modfile.sh %s %f18 %t
! Intrinsics SELECTED_INT_KIND, SELECTED_REAL_KIND, PRECISION, RANGE,
! RADIX, DIGITS
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test folding of combined array references and structure component
! references.
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test UTF-8 support in character literals
! Note: Module files are encoded in UTF-8.
+! RUN: %S/test_modfile.sh %s %f18 %t
! Check that implicitly typed entities get a type in the module file.
module m
+! RUN: %S/test_modfile.sh %s %f18 %t
! Verify miscellaneous bugs
! The function result must be declared after the dummy arguments
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test 7.6 enum values
module m1
+! RUN: %S/test_modfile.sh %s %f18 %t
! Resolution of generic names in expressions.
! Test by using generic function in a specification expression that needs
! to be written to a .mod file.
+! RUN: %S/test_modfile.sh %s %f18 %t
! Resolution of user-defined operators in expressions.
! Test by using generic function in a specification expression that needs
! to be written to a .mod file.
+! RUN: %S/test_modfile.sh %s %f18 %t
! Test resolution of type-bound generics.
module m1
+! RUN: %S/test_modfile.sh %s %f18 %t
module m1
type :: t1
contains
+! RUN: %S/test_errors.sh %s %flang %t
! Test for checking namelist constraints, C8103-C8105
module dup
+! RUN: %S/test_errors.sh %s %flang %t
! NULL() intrinsic function error tests
subroutine test
+! RUN: %S/test_errors.sh %s %flang %t
! Test that NULLIFY works
Module share
+! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in NULLIFY statements
INTEGER, PARAMETER :: maxvalue=1024
+! RUN: %S/test_errors.sh %s %flang %t
! OPTIONS: -fopenmp
! Check OpenMP 2.13.6 atomic Construct
+! RUN: %S/test_errors.sh %s %flang %t
! OPTIONS: -fopenmp
! Check OpenMP clause validity for the following directives:
+! RUN: %S/test_errors.sh %s %flang %t
! OPTIONS: -fopenmp
! Check OpenMP declarative directives
+! RUN: %S/test_errors.sh %s %flang %t
! OPTIONS: -fopenmp
! Check OpenMP clause validity for the following directives:
! 2.10 Device constructs
+! RUN: %S/test_errors.sh %s %flang %t
! OPTIONS: -fopenmp
! Check the association between OpenMPLoopConstruct and DoConstruct
+! RUN: %S/test_errors.sh %s %flang %t
+!XFAIL: *
! OPTIONS: -fopenmp
! Check OpenMP 2.17 Nesting of Regions
+! RUN: %S/test_errors.sh %s %flang %t
!OPTIONS: -fopenmp
! 2.4 An array section designates a subset of the elements in an array. Although
+! RUN: %S/test_errors.sh %s %flang %t
!OPTIONS: -fopenmp
! Test the effect to name resolution from illegal clause
+! RUN: %S/test_errors.sh %s %flang %t
!OPTIONS: -fopenmp
! 2.15.3 Although variables in common blocks can be accessed by use association
+! RUN: %S/test_errors.sh %s %flang %t
!OPTIONS: -fopenmp
! 2.15.3 Data-Sharing Attribute Clauses
+! RUN: %S/test_errors.sh %s %flang %t
!OPTIONS: -fopenmp
! 2.15.3 Data-Sharing Attribute Clauses
+! RUN: %S/test_symbols.sh %s %flang %t
!OPTIONS: -fopenmp
! Test clauses that accept list.
+! RUN: %S/test_symbols.sh %s %flang %t
!OPTIONS: -fopenmp
! 1.4.1 Structure of the OpenMP Memory Model
+! RUN: %S/test_symbols.sh %s %flang %t
!OPTIONS: -fopenmp
! 1.4.1 Structure of the OpenMP Memory Model
+! RUN: %S/test_symbols.sh %s %flang %t
!OPTIONS: -fopenmp
! 2.15.3 Data-Sharing Attribute Clauses
+! RUN: %S/test_symbols.sh %s %flang %t
!OPTIONS: -fopenmp
! 2.15.2 threadprivate Directive
+! RUN: %S/test_symbols.sh %s %flang %t
!OPTIONS: -fopenmp
! 2.15.3 Data-Sharing Attribute Clauses
+! RUN: %S/test_symbols.sh %s %flang %t
!OPTIONS: -fopenmp
! Generic tests
+! RUN: %S/test_symbols.sh %s %flang %t
!OPTIONS: -fopenmp
! 2.15.1.1 Predetermined rules for associated do-loops index variable
+! RUN: %S/test_symbols.sh %s %flang %t
! Tests for "proc-interface" semantics.
! These cases are all valid.
+! RUN: %S/test_errors.sh %s %flang %t
integer :: x
!ERROR: The type of 'x' has already been declared
real :: x
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s
!ERROR: Declaration of 'x' conflicts with its use as internal procedure
real :: x
+! RUN: %S/test_errors.sh %s %flang %t
implicit none
integer :: x
!ERROR: No explicit type declared for 'y'
+! RUN: %S/test_errors.sh %s %flang %t
!ERROR: No explicit type declared for 'f'
function f()
implicit none
+! RUN: %S/test_errors.sh %s %flang %t
program p
integer :: p ! this is ok
end
+! RUN: %S/test_errors.sh %s %flang %t
implicit none
allocatable :: x
integer :: x
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
integer :: x(2)
!ERROR: The dimensions of 'x' have already been declared
+! RUN: %S/test_errors.sh %s %flang %t
integer :: g(10)
f(i) = i + 1 ! statement function
g(i) = i + 2 ! mis-parsed array assignment
+! RUN: %S/test_errors.sh %s %flang %t
integer :: y
procedure() :: a
procedure(real) :: b
+! RUN: %S/test_errors.sh %s %flang %t
module m
public
type t
+! RUN: %S/test_errors.sh %s %flang %t
module m
public i
integer, private :: j
+! RUN: %S/test_errors.sh %s %flang %t
module m1
end
+! RUN: %S/test_errors.sh %s %flang %t
module m1
integer :: x
integer, private :: y
+! RUN: %S/test_errors.sh %s %flang %t
module m1
integer :: x
integer :: y
+! RUN: %S/test_errors.sh %s %flang %t
module m
real :: var
interface i
+! RUN: %S/test_errors.sh %s %flang %t
module m
interface
subroutine sub0
+! RUN: %S/test_errors.sh %s %flang %t
module m
integer :: foo
!Note: PGI, Intel, and GNU allow this; NAG and Sun do not
+! RUN: %S/test_errors.sh %s %flang %t
module m1
implicit none
contains
+! RUN: %S/test_errors.sh %s %flang %t
module m
interface a
subroutine s(x)
+! RUN: %S/test_errors.sh %s %flang %t
module m
abstract interface
subroutine foo
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
type :: t
integer :: i
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
!OK: interface followed by type with same name
interface t
+! RUN: %S/test_errors.sh %s %flang %t
module m
type :: t
real :: y
+! RUN: %S/test_errors.sh %s %flang %t
subroutine test1
!ERROR: Generic interface 'foo' has both a function and a subroutine
interface foo
+! RUN: %S/test_errors.sh %s %flang %t
module m
interface foo
subroutine s1(x)
+! RUN: %S/test_errors.sh %s %flang %t
module m1
interface
module subroutine s()
+! RUN: %S/test_errors.sh %s %flang %t
module m
interface
module subroutine s()
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s
type t
end type
+! RUN: %S/test_errors.sh %s %flang %t
module m
type t1
end type
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
integer x
block
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
integer :: t0
!ERROR: 't0' is not a derived type
+! RUN: %S/test_errors.sh %s %flang %t
module m2
public s2, s4
private s3
+! RUN: %S/test_errors.sh %s %flang %t
! Derived type parameters
module m
+! RUN: %S/test_errors.sh %s %flang %t
! Extended derived types
module m1
+! RUN: %S/test_errors.sh %s %flang %t
! Construct names
subroutine s1
+! RUN: %S/test_errors.sh %s %flang %t
module m1
interface
module subroutine sub1(arg1)
+! RUN: %S/test_errors.sh %s %flang %t
! C701 The type-param-value for a kind type parameter shall be a constant
! expression. This constraint looks like a mistake in the standard.
integer, parameter :: k = 8
+! RUN: %S/test_errors.sh %s %flang %t
! C772
module m1
type t1
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
implicit none
real(8) :: x = 2.0
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
namelist /nl/x
block
+! RUN: %S/test_errors.sh %s %flang %t
module m
implicit none
real, parameter :: a = 8.0
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1
!ERROR: Array 'z' without ALLOCATABLE or POINTER attribute must have explicit shape
common x, y(4), z(:)
+! RUN: %S/test_errors.sh %s %flang %t
! Error tests for structure constructors.
! Errors caught by expression resolution are tested elsewhere; these are the
! errors meant to be caught by name resolution, as well as acceptable use
+! RUN: %S/test_errors.sh %s %flang %t
! Error tests for recursive use of derived types.
program main
+! RUN: %S/test_errors.sh %s %flang %t
function f1(x, y)
integer x
!ERROR: SAVE attribute may not be applied to dummy argument 'x'
+! RUN: %S/test_errors.sh %s %flang %t
! C1030 - pointers to intrinsic procedures
program main
intrinsic :: cos ! a specific & generic intrinsic name
+! RUN: %S/test_errors.sh %s %flang %t
module m1
!ERROR: Logical constant '.true.' may not be used as a defined operator
interface operator(.TRUE.)
+! RUN: %S/test_errors.sh %s %flang %t
! Test correct use-association of a derived type.
module m1
implicit none
+! RUN: %S/test_errors.sh %s %flang %t
! Test section subscript
program p1
real :: a(10,10)
+! RUN: %S/test_errors.sh %s %flang %t
! Test coarray association in CHANGE TEAM statement
subroutine s1
+! RUN: %S/test_errors.sh %s %flang %t
! Test SELECT TYPE errors: C1157
subroutine s1()
+! RUN: %S/test_errors.sh %s %flang %t
! Tests for C760:
! The passed-object dummy argument shall be a scalar, nonpointer, nonallocatable
! dummy data object with the same declared type as the type being defined;
+! RUN: %S/test_errors.sh %s %flang %t
! 15.4.3.4.5 Restrictions on generic declarations
! Specific procedures of generic interfaces must be distinguishable.
+! RUN: %S/test_errors.sh %s %flang %t
! Tests based on examples in C.10.6
! C.10.6(10)
+! RUN: %S/test_errors.sh %s %flang %t
! Tests for C1128:
! A variable-name that appears in a LOCAL or LOCAL_INIT locality-spec shall not
! have the ALLOCATABLE; INTENT (IN); or OPTIONAL attribute; shall not be of
+! RUN: %S/test_errors.sh %s %flang %t
! Test that associations constructs can be correctly combined. The intrinsic
! functions are not what is tested here, they are only use to reveal the types
! of local variables.
+! RUN: %S/test_errors.sh %s %flang %t
! Tests for the last sentence of C1128:
!A variable-name that is not permitted to appear in a variable definition
!context shall not appear in a LOCAL or LOCAL_INIT locality-spec.
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1(x, y)
!ERROR: Array pointer 'x' must have deferred shape or assumed rank
real, pointer :: x(1:) ! C832
+! RUN: %S/test_errors.sh %s %flang %t
! Testing 15.6.2.2 point 4 (What function-name refers to depending on the
! presence of RESULT).
+! RUN: %S/test_errors.sh %s %flang %t
! Testing 7.6 enum
! OK
+! RUN: %S/test_errors.sh %s %flang %t
program p1
integer(8) :: a, b, c, d
pointer(a, b)
+! RUN: %S/test_errors.sh %s %flang %t
! Resolve generic based on number of arguments
subroutine s1
interface f
+! RUN: %S/test_errors.sh %s %flang %t
! Invalid operand types when user-defined operator is available
module m1
type :: t
+! RUN: %S/test_errors.sh %s %flang %t
!OPTIONS: -flogical-abbreviations -fxor-operator
! Like m4 in resolve63 but compiled with different options.
+! RUN: %S/test_errors.sh %s %flang %t
! Test restrictions on what subprograms can be used for defined assignment.
module m1
+! RUN: %S/test_errors.sh %s %flang %t
! Test that user-defined assignment is used in the right places
module m1
+! RUN: %S/test_errors.sh %s %flang %t
! Test restrictions on what subprograms can be used for defined operators.
! See: 15.4.3.4.2
+! RUN: %S/test_errors.sh %s %flang %t
! Test resolution of type-bound generics.
module m1
+! RUN: %S/test_errors.sh %s %flang %t
subroutine s1()
! C701 (R701) The type-param-value for a kind type parameter shall be a
! constant expression.
+! RUN: %S/test_errors.sh %s %flang %t
! C703 (R702) The derived-type-spec shall not specify an abstract type (7.5.7).
! This constraint refers to the derived-type-spec in a type-spec. A type-spec
! can appear in an ALLOCATE statement, an ac-spec for an array constructor, and
+! RUN: %S/test_errors.sh %s %flang %t
! C708 An entity declared with the CLASS keyword shall be a dummy argument
! or have the ALLOCATABLE or POINTER attribute.
subroutine s()
+! RUN: %S/test_errors.sh %s %flang %t
! C709 An assumed-type entity shall be a dummy data object that does not have
! the ALLOCATABLE, CODIMENSION, INTENT (OUT), POINTER, or VALUE attribute and
! is not an explicit-shape array.
+! RUN: %S/test_errors.sh %s %flang %t
! C721 A type-param-value of * shall be used only
! * to declare a dummy argument,
! * to declare a named constant,
+! RUN: %S/test_errors.sh %s %flang %t
! C722 A function name shall not be declared with an asterisk type-param-value
! unless it is of type CHARACTER and is the name of a dummy function or the
! name of the result of an external function.
+! RUN: %S/test_errors.sh %s %flang %t
! C726 The length specified for a character statement function or for a
! statement function dummy argument of type character shall be a constant
! expression.
+! RUN: %S/test_errors.sh %s %flang %t
!===--- separate-module-procs.f90 - Test separate module procedure ---------===
!
! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+! RUN: %S/test_errors.sh %s %flang %t
program main
implicit none
integer :: i = -1
+! RUN: %S/test_errors.sh %s %flang %t
! Error tests for structure constructors.
! Errors caught by name resolution are tested elsewhere; these are the
! errors meant to be caught by expression semantic analysis, as well as
+! RUN: %S/test_errors.sh %s %flang %t
! Error tests for structure constructors: per-component type
! (in)compatibility.
+! RUN: %S/test_errors.sh %s %flang %t
! Error tests for structure constructors: C1594 violations
! from assigning globally-visible data to POINTER components.
! test/Semantics/structconst04.f90 is this same test without type
+! RUN: %S/test_errors.sh %s %flang %t
! Error tests for structure constructors: C1594 violations
! from assigning globally-visible data to POINTER components.
! This test is structconst03.f90 with the type parameters removed.
+! RUN: %S/test_symbols.sh %s %flang %t
! Test that intent-stmt and subprogram prefix and suffix are resolved.
!DEF: /m Module
+! RUN: %S/test_symbols.sh %s %flang %t
! Test host association in module subroutine and internal subroutine.
!DEF: /m Module
+! RUN: %S/test_symbols.sh %s %flang %t
! Test host association in internal subroutine of main program.
!DEF: /main MainProgram
+! RUN: %S/test_symbols.sh %s %flang %t
! Explicit and implicit entities in blocks
!DEF: /s1 (Subroutine) Subprogram
+! RUN: %S/test_symbols.sh %s %flang %t
!DEF: /main MainProgram
program main
!DEF: /main/t1 DerivedType
+! RUN: %S/test_symbols.sh %s %flang %t
!DEF: /main MainProgram
program main
implicit complex(z)
+! RUN: %S/test_symbols.sh %s %flang %t
!DEF: /main MainProgram
program main
!DEF: /main/x POINTER ObjectEntity REAL(4)
+! RUN: %S/test_symbols.sh %s %flang %t
!DEF: /s1 (Subroutine) Subprogram
subroutine s1
!DEF: /s1/a ObjectEntity REAL(4)
+! RUN: %S/test_symbols.sh %s %flang %t
!DEF: /m1 Module
module m1
contains
+! RUN: %S/test_symbols.sh %s %flang %t
!DEF: /s1 (Subroutine) Subprogram
subroutine s1
implicit none
+! RUN: %S/test_symbols.sh %s %flang %t
! Verify that SAVE attribute is propagated by EQUIVALENCE
!DEF: /s1 (Subroutine) Subprogram
+! RUN: %S/test_symbols.sh %s %flang %t
! Old-style "*length" specifiers (R723)
!DEF: /f1 (Function) Subprogram CHARACTER(1_8,1)
+! RUN: %S/test_symbols.sh %s %flang %t
! "Bare" uses of type parameters and components
!DEF: /MainProgram1/t1 DerivedType
+! RUN: %S/test_symbols.sh %s %flang %t
! Forward references in pointer initializers and TBP bindings.
!DEF: /m Module
+! RUN: %S/test_symbols.sh %s %flang %t
! Statement functions
!DEF: /p1 MainProgram
+! RUN: %S/test_symbols.sh %s %flang %t
! Forward references to derived types (non-error cases)
!DEF: /main MainProgram