Debian Codegraph @

gcc/testsuite/gfortran.dg/g77/19990218-1.f

raw
1 c { dg-do compile }
2 c
3 c g77 used to warn for this case
4 c 19990218-1.f: In program `test':
5 c 19990218-1.f:13:
6 c double precision function fun(a,b)
7 c 1
8 c 19990218-1.f:23: (continued):
9 c c=fun(a,b)
10 c 2
11 c Global name `fun' at (2) has different type at (1) [info -f g77 M GLOBALS]
12 c
13 double precision function fun(a,b)
14 double precision a,b
15 print*,'in sub: a,b=',a,b
16 fun=a*b
17 print*,'in sub: fun=',fun
18 return
19 end
20 program test
21 double precision a,b,c
22 data a,b/1.0d-46,1.0d0/
23 c=fun(a,b) ! { dg-error "Return type mismatch of function" }
24 print*,'in main: fun=',c
25 end