Debian Codegraph @

gcc/testsuite/gfortran.dg/pr95338.f90

raw
1 ! { dg-do run }
2 ! { dg-additional-options "-O1 -ff2c" }
3 !
4 ! PR fortran/95338 - mixed ENTRY results with -ff2c must use the ABI
5 ! return type in the master union.
6
7 module m
8 contains
9 function f(x)
10 integer :: x
11 integer :: f
12 real :: g
13
14 f = x
15 return
16
17 entry g(x)
18 g = x
19 end
20 end
21
22 program p
23 use m
24
25 if (f(1) /= 1) stop 1
26 if (g(1) /= 1.0) stop 2
27 end