[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Integration / iso-fortran-binding.cpp
blobaaafd7cccd07d0e59b34f865154b59986cca5ae1
1 // UNSUPPORTED: system-windows
2 // RUN: split-file %s %t
3 // RUN: chmod +x %t/runtest.sh
4 // RUN: %t/runtest.sh %t %t/cppfile.cpp %flang | FileCheck %s
6 //--- cppfile.cpp
7 extern "C" {
8 #include "ISO_Fortran_binding.h"
10 #include <iostream>
12 int main() {
13 std::cout << "PASS\n";
14 return 0;
17 // CHECK: PASS
18 // clang-format off
19 //--- runtest.sh
20 #!/bin/bash
21 TMPDIR=$1
22 CPPFILE=$2
23 FLANG=$3
24 BINDIR=`dirname $FLANG`
25 CPPCOMP=$BINDIR/clang++
26 if [ -x $CPPCOMP ]
27 then
28 $CPPCOMP $CPPFILE -o $TMPDIR/a.out
29 $TMPDIR/a.out # should print "PASS"
30 else
31 # No clang compiler, just pass by default
32 echo "PASS"