-! RUN: %S/test_any.sh %s %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: end do
SUBROUTINE sub00(a,b,n,m)
-! RUN: %S/test_any.sh %s %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: end do
SUBROUTINE sub00(a,b,n,m)
-! RUN: %S/test_any.sh %s %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: 10 continue
! CHECK: end do
-! RUN: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK-NOT: do [1-9]
! Figure out how to also execute this test.
-! RUN: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
-! XXXEXEC: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
+! RUN: %f18 -fopenmp -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK-NOT: do *[1-9]
program P
-! RUN: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %f18 -fopenmp -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK-NOT: do *[1-9]
! CHECK: omp simd
-! RUN: %S/test_any.sh %s %t %f18
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1131
-! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! RUN: %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 %t %f18
! 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.
-! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
+! RUN: %f18 -funparse-with-symbols -Mstandard %s 2>&1 | FileCheck %s
! CHECK: end do
! CHECK: 2 do
-! RUN: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK-NOT: Control flow escapes from CRITICAL
subroutine test1(a, i)
-! RUN: %S/test_any.sh %s %t %f18
-! negative tests: we don't want DO CONCURRENT semantics constraints checked
! when the loops are not DO CONCURRENT
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %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: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %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 %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK-NOT: exit from DO CONCURRENT construct
subroutine do_concurrent_test1(n)
-! RUN: %S/test_any.sh %s %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %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 %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %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 %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %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 %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: Label '50' was not found
! CHECK: Label '55' is not in scope
! CHECK: Label '70' is not a branch target
-! RUN: %S/test_any.sh %s %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: Label '10' is not in scope
! CHECK: Label '20' was not found
! CHECK: Label '30' is not a branch target
-! RUN: %S/test_any.sh %s %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: Label '30' is not a branch target
! CHECK: Control flow use of '30'
! CHECK: Label '10' is not in scope
-! RUN: %S/test_any.sh %s %t %f18
-! negative test -- invalid labels, out of range
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %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: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: Label '60' was not found
subroutine s(a)
-! RUN: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: '60' not a FORMAT
! CHECK: data transfer use of '60'
-! RUN: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: expected end of statement
subroutine s
-! RUN: %S/test_any.sh %s %t %f18
-! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
+! RUN: %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 %t %f18
! Tests implemented for this standard
! 11.1.4 - 4 It is permissible to branch to and end-block-stmt only withinh its
! Block Construct
-! EXEC: ${F18} %s 2>&1 | ${FileCheck} %s
+! RUN: not %f18 %s 2>&1 | FileCheck %s
! CHECK: Label '20' is not in scope
subroutine s1
+++ /dev/null
-#/usr/bin/env bash
-# Compile a source file with '-funparse-with-symbols' and verify
-# we get the right symbols in the output, i.e. the output should be
-# the same as the input, except for the copyright comment.
-# Change the compiler by setting the F18 environment variable.
-
-srcdir=$(dirname $0)
-source $srcdir/common.sh
-
-FileCheck=internal_check
-
-function internal_check() {
- r=true
- linput="$1"
- lstdin=`mktemp`
- lcheck=`mktemp`
- cat - > ${lstdin}
- egrep '^[[:space:]]*![[:space:]]*CHECK:[[:space:]]*' ${linput} | sed -e 's/^[[:space:]]*![[:space:]]*CHECK:[[:space:]]*//' > ${lcheck} 2>/dev/null
- while read p; do
- if egrep "${p}" ${lstdin} >/dev/null 2>&1; then
- true
- else
- echo "Not found: ${p}" >&2
- r=false
- fi
- done < ${lcheck}
- egrep '^[[:space:]]*![[:space:]]*CHECK-NOT:[[:space:]]*' ${linput} | sed -e 's/^[[:space:]]*![[:space:]]*CHECK-NOT:[[:space:]]*//' > ${lcheck} 2>/dev/null
- while read p; do
- if egrep "${p}" ${lstdin} >/dev/null 2>&1; then
- echo "Found: ${p}" >&2
- r=false
- fi
- done < ${lcheck}
- egrep '^[[:space:]]*![[:space:]]*CHECK-ONCE:[[:space:]]*' ${linput} | sed -e 's/^[[:space:]]*![[:space:]]*CHECK-ONCE:[[:space:]]*//' > ${lcheck} 2>/dev/null
- while read p; do
- count=$(egrep -o -e "${p}" ${lstdin} | wc -l)
- if [ ${count} -eq 0 ]; then
- echo "Not found: ${p}" >&2
- r=false
- fi
- if [ ${count} -gt 1 ]; then
- echo "Found duplicates: ${p}" >&2
- r=false
- fi
- done < ${lcheck}
- rm -f ${lstdin} ${lcheck}
- ${r}
-}
-
-gr=0
-for input in $src; do
- [[ ! -f $input ]] && die "File not found: $input"
- CMD=$(cat ${input} | egrep '^[[:space:]]*![[:space:]]*EXEC:[[:space:]]*' | sed -e 's/^[[:space:]]*![[:space:]]*EXEC:[[:space:]]*//')
- CMD=$(echo ${CMD} | sed -e "s:%s:${input}:g")
- if egrep -q -e '%t' <<< ${CMD} ; then
- CMD=$(echo ${CMD} | sed -e "s:%t:$temp/t:g")
- fi
- if $(eval $CMD); then
- echo "PASS ${input}"
- else
- echo "FAIL ${input}"
- gr=1
- fi
-done
-exit $gr