summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/warn_argument_mismatch_1.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/warn_argument_mismatch_1.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/warn_argument_mismatch_1.f9034
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/warn_argument_mismatch_1.f90 b/gcc/testsuite/gfortran.dg/warn_argument_mismatch_1.f90
new file mode 100644
index 00000000000..6a663e66b5f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_argument_mismatch_1.f90
@@ -0,0 +1,34 @@
+! { dg-do compile }
+! { dg-options "-Wno-argument-mismatch" }
+!
+! No warnings should be output here with -Wno-argument-mismatch.
+!
+
+subroutine s1(x)
+ implicit none
+ integer, intent(in) :: x
+ print *, x
+end subroutine
+
+subroutine s2(x)
+ implicit none
+ integer, intent(in) :: x(1)
+ print *, x
+end subroutine
+
+subroutine s3(x)
+ implicit none
+ integer, intent(in) :: x(2)
+ print *, x
+end subroutine
+
+implicit none
+integer :: x, y(1)
+real :: r
+
+call s1(r)
+call s1(y)
+call s2(x)
+call s3(y)
+
+end