summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/whole_file_17.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/whole_file_17.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_17.f9022
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/whole_file_17.f90 b/gcc/testsuite/gfortran.dg/whole_file_17.f90
new file mode 100644
index 000000000..86272b848
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/whole_file_17.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-fwhole-file" }
+!
+! PR fortran/30668
+!
+
+integer(8) function two()
+ two = 2
+end function two
+
+CHARACTER(len=8) function string()
+ string = "gfortran"
+end function string
+
+
+program xx
+ INTEGER :: a
+ CHARACTER(len=4) :: s, string ! { dg-error "Character length mismatch" }
+
+ a = two() ! { dg-error "Return type mismatch" }
+ s = string()
+end program xx