------- Comment #1 from burnus at gcc dot gnu dot org 2007-02-20 16:28 ------- Compiles with nagf95 and g95.
ifort and gfortran give however the following error messages: test=test(3) 1 Error: 'test' is array valued and directly recursive at (1) , so the keyword RESULT must be specified in the FUNCTION statement and fortcom: Warning: dtgv.f90, line 9: Recursive array-valued function without result variable ambiguous [TEST] RECURSIVE FUNCTION test(i) --------------------^ fortcom: Error: dtgv.f90, line 15: A recursive function name must not be used in this context. [TEST] test(1:6-i)=(/(j,j=i,5)/) ----^ fortcom: Error: dtgv.f90, line 15: A colon (:) is not valid in this context. [1] test(1:6-i)=(/(j,j=i,5)/) ---------^ -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu dot | |org Keywords| |rejects-valid Summary|incorrect error message for |Array valued recursive |valid code |function rejected http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30876