summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/include_5.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/include_5.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/include_5.f9018
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/include_5.f90 b/gcc/testsuite/gfortran.dg/include_5.f90
new file mode 100644
index 000000000..2bfd2bb09
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/include_5.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! { dg-options "-cpp" }
+!
+! PR fortran/37821
+!
+! Ensure that for #include "..." and for include the
+! current directory/directory of the source file is
+! included.
+
+subroutine one()
+ include "include_4.inc"
+ integer(i4) :: i
+end subroutine one
+
+subroutine two()
+# include "include_4.inc"
+ integer(i4) :: i
+end subroutine two