* [Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions
2007-02-20 7:51 [Bug fortran/30873] New: incorrect error message for valid code jv244 at cam dot ac dot uk
@ 2007-02-20 16:24 ` burnus at gcc dot gnu dot org
2007-02-21 11:03 ` pault at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-20 16:24 UTC (permalink / raw)
To: gcc-bugs
------- 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|0000-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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions
2007-02-20 7:51 [Bug fortran/30873] New: incorrect error message for valid code jv244 at cam dot ac dot uk
2007-02-20 16:24 ` [Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions burnus at gcc dot gnu dot org
@ 2007-02-21 11:03 ` pault at gcc dot gnu dot org
2007-02-21 13:53 ` burnus at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-02-21 11:03 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions
2007-02-20 7:51 [Bug fortran/30873] New: incorrect error message for valid code jv244 at cam dot ac dot uk
2007-02-20 16:24 ` [Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions burnus at gcc dot gnu dot org
2007-02-21 11:03 ` pault at gcc dot gnu dot org
@ 2007-02-21 13:53 ` burnus at gcc dot gnu dot org
2007-03-02 23:03 ` burnus at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-21 13:53 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30873] ENTRY without explict RESULT does not work for recursive functions
2007-02-20 7:51 [Bug fortran/30873] New: incorrect error message for valid code jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2007-02-21 13:53 ` burnus at gcc dot gnu dot org
@ 2007-03-02 23:03 ` burnus at gcc dot gnu dot org
2007-03-02 23:07 ` [Bug fortran/30873] [4.1 and 4.2 only] " burnus at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-02 23:03 UTC (permalink / raw)
To: gcc-bugs
------- 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 <pault@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/30873
* decl.c (gfc_match_entry): Remove erroneous entry result check.
2007-03-02 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30873] [4.1 and 4.2 only] ENTRY without explict RESULT does not work for recursive functions
2007-02-20 7:51 [Bug fortran/30873] New: incorrect error message for valid code jv244 at cam dot ac dot uk
` (3 preceding siblings ...)
2007-03-02 23:03 ` burnus at gcc dot gnu dot org
@ 2007-03-02 23:07 ` burnus at gcc dot gnu dot org
2007-03-03 3:01 ` patchapp at dberlin dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-02 23:07 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |burnus at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-02-20 16:24:01 |2007-03-02 23:07:25
date| |
Summary|ENTRY without explict RESULT|[4.1 and 4.2 only] ENTRY
|does not work for recursive |without explict RESULT does
|functions |not work for recursive
| |functions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30873] [4.1 and 4.2 only] ENTRY without explict RESULT does not work for recursive functions
2007-02-20 7:51 [Bug fortran/30873] New: incorrect error message for valid code jv244 at cam dot ac dot uk
` (4 preceding siblings ...)
2007-03-02 23:07 ` [Bug fortran/30873] [4.1 and 4.2 only] " burnus at gcc dot gnu dot org
@ 2007-03-03 3:01 ` patchapp at dberlin dot org
2007-03-08 21:06 ` burnus at gcc dot gnu dot org
2007-03-08 21:07 ` [Bug fortran/30873] [4.1 " burnus at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: patchapp at dberlin dot org @ 2007-03-03 3:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from patchapp at dberlin dot org 2007-03-03 03:01 -------
Subject: Bug number PR30873
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00110.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30873] [4.1 and 4.2 only] ENTRY without explict RESULT does not work for recursive functions
2007-02-20 7:51 [Bug fortran/30873] New: incorrect error message for valid code jv244 at cam dot ac dot uk
` (5 preceding siblings ...)
2007-03-03 3:01 ` patchapp at dberlin dot org
@ 2007-03-08 21:06 ` burnus at gcc dot gnu dot org
2007-03-08 21:07 ` [Bug fortran/30873] [4.1 " burnus at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-08 21:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from burnus at gcc dot gnu dot org 2007-03-08 21:06 -------
Subject: Bug 30873
Author: burnus
Date: Thu Mar 8 21:06:37 2007
New Revision: 122711
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122711
Log:
2007-03-08 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/30873
* decl.c (gfc_match_entry): Remove erroneous entry result check.
2007-03-08 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/30873
* gfortran.dg/entry_9.f90: New test.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/entry_9.f90
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/decl.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30873] [4.1 only] ENTRY without explict RESULT does not work for recursive functions
2007-02-20 7:51 [Bug fortran/30873] New: incorrect error message for valid code jv244 at cam dot ac dot uk
` (6 preceding siblings ...)
2007-03-08 21:06 ` burnus at gcc dot gnu dot org
@ 2007-03-08 21:07 ` burnus at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-08 21:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from burnus at gcc dot gnu dot org 2007-03-08 21:07 -------
Fixed in 4.2 (and 4.3), not a wrong-code bug => Won't fix for 4.1.
Close.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Summary|[4.1 and 4.2 only] ENTRY |[4.1 only] ENTRY without
|without explict RESULT does |explict RESULT does not work
|not work for recursive |for recursive functions
|functions |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30873
^ permalink raw reply [flat|nested] 9+ messages in thread