diff gcc/testsuite/gfortran.dg/func_decl_2.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900 (2017-10-27)
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gfortran.dg/func_decl_2.f90	Fri Oct 27 22:46:09 2017 +0900
@@ -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