[Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions
--- Comment #4 from burnus at gcc dot gnu dot org 2007-03-02 23:03 --- Subject: Bug 30873 Author: burnus Date: Fri Mar 2 23:03:26 2007 New Revision: 122495 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122495 Log: 2007-03-02 Paul Thomas <[EMAIL PROTECTED]> Tobias Burnus <[EMAIL PROTECTED]> PR fortran/30873 * decl.c (gfc_match_entry): Remove erroneous entry result check. 2007-03-02 Paul Thomas <[EMAIL PROTECTED]> Tobias Burnus <[EMAIL PROTECTED]> PR fortran/30873 * gfortran.dg/entry_9.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/entry_9.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30873
[Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions
--- Comment #3 from burnus at gcc dot gnu dot org 2007-02-21 13:53 --- > Removing the error call > if (proc->attr.recursive && result == NULL) > { > gfc_error ("RESULT attribute required in ENTRY statement at %C"); > return MATCH_ERROR; > } > at decl.c:3032 fixes the problem. This is a very old check. I could trace it back to: r69825: * gcc/fortran: New front end. I just checked the current g95 source code and it also doesn't contain this error anymore. > I guess that there is a testsuite case for this? I have not regtested it. > This looks to me as if it is a mis-interpretation or simplification of the > standard - it had better be checked. I just comment it and run a make check-gfortran, which succeeded. Maybe one should re-read the ENTRY section of the standard and try to come up with something which is not covered, but I think this patch has no unwanted side effects. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30873
[Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions
--- Comment #2 from pault at gcc dot gnu dot org 2007-02-21 11:02 --- Removing the error call if (proc->attr.recursive && result == NULL) { gfc_error ("RESULT attribute required in ENTRY statement at %C"); return MATCH_ERROR; } at decl.c:3032 fixes the problem. I guess that there is a testsuite case for this? I have not regtested it. This looks to me as if it is a mis-interpretation or simplification of the standard - it had better be checked. As with others, if anybody wants to run with this, be my guest. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30873
[Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions
--- Comment #1 from burnus at gcc dot gnu dot org 2007-02-20 16:24 --- ENTRY E1(I) 1 Error: RESULT attribute required in ENTRY statement at (1) Note: It works if one removes the "recursive". Compiles just fine with nagf95, ifort and g95. Ad hoc I don't see anything in the standard which forbids this. -- burnus at gcc dot gnu dot org changed: What|Removed |Added CC||burnus at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||rejects-valid Last reconfirmed|-00-00 00:00:00 |2007-02-20 16:24:01 date|| Summary|incorrect error message for |ENTRY without explict RESULT |valid code |does not work for recursive ||functions http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30873