summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/func_decl_2.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/func_decl_2.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/func_decl_2.f9019
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/func_decl_2.f90 b/gcc/testsuite/gfortran.dg/func_decl_2.f90
new file mode 100644
index 000000000..658883e65
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/func_decl_2.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+! Test fix for PR16943 in which the double typing of
+! N caused an error.
+!
+! Contributed by Paul Thomas <pault@gcc.gnu.org>
+!
+ program bug8
+ implicit none
+ stop " OK. "
+
+ contains
+
+ integer function bugf(M) result (N)
+ integer, intent (in) :: M
+ integer :: N ! { dg-error "already has basic type of INTEGER" }
+ N = M
+ return
+ end function bugf
+ end program bug8