OSDN Git Service

PR c++/9335
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / func_decl_1.f90
1 ! { dg-do compile }
2 ! we didn't correctly reject function declarations without argument lists
3 ! note that there are no end statements for syntactically wrong function
4 ! declarations
5   interface
6      function f1     ! { dg-error "Expected formal argument list" }
7      function f3()
8      end function f3
9      function f4 result (x) ! { dg-error "Expected formal argument list" }
10      function f5() result (x)
11      end function f5
12    end interface
13   f1 = 1.
14 end
15
16 FUNCTION f1          ! { dg-error "Expected formal argument list" }
17
18 function f2()
19   f2 = 1.
20 end function f2
21
22 function f3 result (x) ! { dg-error "Expected formal argument list" }
23
24 function f4 () result (x)
25   x = 4.
26 end function f4