OSDN Git Service

2008-02-21 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / func_decl_2.f90
1 ! { dg-do compile }
2 ! Test fix for PR16943 in which the double typing of
3 ! N caused an error.  This is a common extension to the
4 ! F95 standard, so the error is only thrown for -std=f95
5 ! or -pedantic.
6 !
7 ! Contributed by Paul Thomas  <pault@gcc.gnu.org>
8 !
9   program bug8 
10     implicit none 
11     stop " OK. " 
12
13   contains 
14
15     integer function bugf(M) result (N) 
16       integer, intent (in) :: M 
17       integer :: N ! { dg-warning "already has basic type of INTEGER" }
18       N = M 
19       return 
20     end function bugf
21   end program bug8