! { dg-do run }! PR 22607: PURE return-by-reference functionsprogram mainimplicit noneinteger,dimension(2)::bb=fun(size(b))if(b(1)/=1.or.b(2)/=2)call abort()contains pure function fun(n)integer,intent(in)::ninteger::fun(n)integer::ido i=1,nfun(i)=iend do end function funend program main