Merge Ignore and Deprecated in .opt files.
[official-gcc.git] / gcc / testsuite / gfortran.dg / whole_file_7.f90
blob80609cad5af0625326581da6d1261f17bfba862f
1 ! { dg-do compile }
2 ! Test the fixes for the first two problems in PR40011
4 ! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr>
6 ! This function would not compile because -fwhole-file would
7 ! try repeatedly to resolve the function because of the self
8 ! reference.
9 RECURSIVE FUNCTION eval_args(q) result (r)
10 INTEGER NNODE
11 PARAMETER (NNODE = 10)
12 TYPE NODE
13 SEQUENCE
14 INTEGER car
15 INTEGER cdr
16 END TYPE NODE
17 TYPE(NODE) heap(NNODE)
18 INTEGER r, q
19 r = eval_args(heap(q)%cdr)
20 END FUNCTION eval_args
22 function test(n)
23 real, dimension(2) :: test
24 integer :: n
25 test = n
26 return
27 end function test
29 program arr ! The error was not picked up causing an ICE
30 real, dimension(2) :: res
31 res = test(2) ! { dg-error "Explicit interface required" }
32 print *, res
33 end program