2 ! { dg-options "-fwhole-file" }
3 ! Test the fix for the fourth problem in PR40011, where the
4 ! entries were not resolved, resulting in a segfault.
6 ! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr>
11 integer :: bad_stuff (2)
13 end function bad_stuff
14 recursive function rec_stuff(n) result (tmp)
15 integer :: n(2), tmp(2)
16 end function rec_stuff
19 res = bad_stuff((/-19,-30/))
23 recursive function bad_stuff(n)
24 integer :: bad_stuff (2)
25 integer :: n(2), tmp(2), ent = 0, sent = 0
28 entry rec_stuff(n) result (tmp)
35 if(maxval (n) < 5) then
36 tmp = tmp + rec_stuff (n+1)
41 bad_stuff = tmp + bad_stuff (1)
46 end function bad_stuff