1! { dg-do compile } 2! PR35680 - used to ICE because the argument of SIZE, being in a restricted 3! expression, was not checked if it too is restricted or is a variable. Since 4! it is neither, an error should be produced. 5! 6! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 7! 8program main 9 print *, foo (), bar (), foobar () 10contains 11 function foo () 12 integer foo(size (transfer (x, [1]))) ! { dg-error "cannot appear" } 13 real x 14 end function 15 function bar() 16 real x 17 integer bar(size (transfer (x, [1]))) ! { dg-error "cannot appear" } 18 end function 19 function foobar() ! { dg-error "no IMPLICIT" } 20 implicit none 21 integer foobar(size (transfer (x, [1]))) ! { dg-error "used before" } 22 real x 23 end function 24end program 25