// C files are currently not supported (i.e. `flang -cc1`). Make sure that the
// driver reports this as expected.
-//-----------
-// RUN LINES
-//-----------
// RUN: not %flang %s 2>&1 | FileCheck %s
-//-----------------------
-// EXPECTED OUTPUT
-//-----------------------
// CHECK: error: unknown integrated tool '-cc1'. Valid tools include '-fc1'.
// C++ files are currently not supported (i.e. `flang -cc1`). Make sure that the
// driver reports this as expected.
-//-----------
-// RUN LINES
-//-----------
// RUN: not %flang %s 2>&1 | FileCheck %s
-//-----------------------
-// EXPECTED OUTPUT
-//-----------------------
// CHECK: error: unknown integrated tool '-cc1'. Valid tools include '-fc1'.
! RUN: %flang_fc1 -load %llvmshlibdir/flangPrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
-!-----------------------------
-! EXPECTED OUTPUT: Counts == 0
-!-----------------------------
! CHECK: ==== Functions: 0 ====
! CHECK-NEXT: ==== Subroutines: 0 ====
-!-----------------------------
-! INPUT
-!-----------------------------
program main
call subroutine1
fn1 = function1()
! RUN: %flang_fc1 -load %llvmshlibdir/flangPrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
-!-------------------------------------------------
-! EXPECTED OUTPUT: Names printed and counts != 0
-!-------------------------------------------------
! CHECK: Function: external_func1
! CHECK-NEXT: Function: external_func2
! CHECK-NEXT: Subroutine: external_subr
! CHECK-NEXT: ==== Functions: 3 ====
! CHECK-NEXT: ==== Subroutines: 2 ====
-!--------------------------
-! INPUT
-!--------------------------
function external_func1()
end function
! RUN: %flang_fc1 -load %llvmshlibdir/flangPrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
-!-----------------------------
-! EXPECTED OUTPUT: Counts == 0
-!-----------------------------
! CHECK: ==== Functions: 0 ====
! CHECK-NEXT: ==== Subroutines: 0 ====
-!--------------------------
-! INPUT
-!--------------------------
program main
interface
function interface_func()
! TEST 5: Write to a file (explicit)
! RUN: %flang_fc1 -test-io -o %t %s 2>&1 && FileCheck %s --match-full-lines --input-file=%t
-!-----------------------
-! EXPECTED OUTPUT
-!-----------------------
! CHECK-LABEL: Program arithmetic
! CHECK-NEXT: Integer :: i, j
! CHECK-NEXT: i = 2; j = 3; i= i * j;
! RUN: %flang_fc1 -test-io %s %S/Inputs/hello-world.f90 -o %t 2>&1 \
! RUN: && FileCheck %s --input-file=%t --match-full-lines -check-prefix=FC1-OUTPUT3
-!-----------------------
-! EXPECTED OUTPUT
-!-----------------------
! TEST 1: By default, `flang` prints the output from all input files to
! stdout
! FLANG-LABEL: Program arithmetic
! needs to make sure that the diagnostics are indeed issued (rather that relying
! on some DiagnosticsEngine).
-!-----------
-! RUN LINES
-!-----------
! Test with -E (i.e. PrintPreprocessedAction, stops after prescanning)
! RUN: %flang -E -I %S/Inputs/ %s 2>&1 | FileCheck %s
! RUN: %flang_fc1 -E -I %S/Inputs/ %s 2>&1 | FileCheck %s
! RUN: %flang -fsyntax-only -I %S/Inputs/ %s 2>&1 | FileCheck %s
! RUN: %flang_fc1 -fsyntax-only -I %S/Inputs/ %s 2>&1 | FileCheck %s
-!-----------------------
-! EXPECTED OUTPUT
-!-----------------------
-! CHECK: prescanner-diag.f90:27:20: portability: #include: extra stuff ignored after file name
-! CHECK: prescanner-diag.f90:28:20: portability: #include: extra stuff ignored after file name
+! CHECK: prescanner-diag.f90:[[#@LINE+3]]:20: portability: #include: extra stuff ignored after file name
+! CHECK: prescanner-diag.f90:[[#@LINE+3]]:20: portability: #include: extra stuff ignored after file name
-!-------
-! INPUT
-!-------
#include <empty.h> comment
#include "empty.h" comment
end