public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20865] New: error needed
@ 2005-04-08 15:57 jv244 at cam dot ac dot uk
2005-04-22 14:44 ` [Bug fortran/20865] statement function shall not be supplied as procedure argument tobi at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jv244 at cam dot ac dot uk @ 2005-04-08 15:57 UTC (permalink / raw)
To: gcc-bugs
The following is non-standard and the compiler should probably generate a
warning/error with '-pedantic -std=f95'
INTEGER :: I,st1
st1(I)=(I*I+2)
CALL TT(st1) ! 12.5.4
END
SUBROUTINE TT(st1)
INTEGER :: st1
END SUBROUTINE
--
Summary: error needed
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20865
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/20865] statement function shall not be supplied as procedure argument
2005-04-08 15:57 [Bug fortran/20865] New: error needed jv244 at cam dot ac dot uk
@ 2005-04-22 14:44 ` tobi at gcc dot gnu dot org
2005-04-28 7:58 ` fxcoudert at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-04-22 14:44 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Summary|error needed |statement function shall not
| |be supplied as procedure
| |argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20865
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/20865] statement function shall not be supplied as procedure argument
2005-04-08 15:57 [Bug fortran/20865] New: error needed jv244 at cam dot ac dot uk
2005-04-22 14:44 ` [Bug fortran/20865] statement function shall not be supplied as procedure argument tobi at gcc dot gnu dot org
@ 2005-04-28 7:58 ` fxcoudert at gcc dot gnu dot org
2005-04-28 9:21 ` fxcoudert at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-04-28 7:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-04-28 07:58 -------
Possible patch:
diff -p -u -r1.39 resolve.c
--- gcc/fortran/resolve.c 19 Mar 2005 19:45:33 -0000 1.39
+++ gcc/fortran/resolve.c 28 Apr 2005 07:56:12 -0000
@@ -616,6 +616,13 @@ resolve_actual_arglist (gfc_actual_argli
continue;
}
+ if (sym->attr.flavor == FL_PROCEDURE &&
+ sym->attr.proc == PROC_ST_FUNCTION)
+ {
+ gfc_error ("Statement function '%s' at %L is not allowed as an "
+ "actual argument", sym->name, &e->where);
+ }
+
/* See if the name is a module procedure in a parent unit. */
if (was_declared (sym) || sym->ns->parent == NULL)
I will look to see if I forgot something, then regtest, then post it.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
GCC target triplet|i686-pc-linux-gnu |
Keywords| |patch
Last reconfirmed|0000-00-00 00:00:00 |2005-04-28 07:58:03
date| |
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20865
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/20865] statement function shall not be supplied as procedure argument
2005-04-08 15:57 [Bug fortran/20865] New: error needed jv244 at cam dot ac dot uk
2005-04-22 14:44 ` [Bug fortran/20865] statement function shall not be supplied as procedure argument tobi at gcc dot gnu dot org
2005-04-28 7:58 ` fxcoudert at gcc dot gnu dot org
@ 2005-04-28 9:21 ` fxcoudert at gcc dot gnu dot org
2005-04-28 11:35 ` fxcoudert at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-04-28 9:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-04-28 09:19 -------
It does not fix the error. Will look further into it.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|patch |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20865
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/20865] statement function shall not be supplied as procedure argument
2005-04-08 15:57 [Bug fortran/20865] New: error needed jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2005-04-28 9:21 ` fxcoudert at gcc dot gnu dot org
@ 2005-04-28 11:35 ` fxcoudert at gcc dot gnu dot org
2005-04-28 11:56 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-04-28 11:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-04-28 11:34 -------
New patch proposed: http://gcc.gnu.org/ml/fortran/2005-04/msg00667.html
--
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/fortra
| |n/2005-04/msg00667.html
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20865
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/20865] statement function shall not be supplied as procedure argument
2005-04-08 15:57 [Bug fortran/20865] New: error needed jv244 at cam dot ac dot uk
` (3 preceding siblings ...)
2005-04-28 11:35 ` fxcoudert at gcc dot gnu dot org
@ 2005-04-28 11:56 ` cvs-commit at gcc dot gnu dot org
2005-04-28 11:56 ` cvs-commit at gcc dot gnu dot org
2005-04-28 13:25 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-28 11:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-28 11:56 -------
Subject: Bug 20865
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: fxcoudert@gcc.gnu.org 2005-04-28 11:56:03
Modified files:
gcc/fortran : ChangeLog resolve.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: pr20865.f90
Log message:
PR fortran/20865
* resolve.c (resolve_actual_arglist): Issue an error if a statement
functions is used as actual argument.
* gfortran.dg/pr20865.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.40&r2=1.335.2.41
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.34.2.5&r2=1.34.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.145&r2=1.5084.2.146
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr20865.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-28 11:56 -------
Subject: Bug 20865
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: fxcoudert@gcc.gnu.org 2005-04-28 11:56:08
Modified files:
gcc/fortran : ChangeLog resolve.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: pr20865.f90
Log message:
PR fortran/20865
* resolve.c (resolve_actual_arglist): Issue an error if a statement
functions is used as actual argument.
* gfortran.dg/pr20865.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.407&r2=1.408
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&r1=1.40&r2=1.41
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5409&r2=1.5410
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr20865.f90.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20865
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/20865] statement function shall not be supplied as procedure argument
2005-04-08 15:57 [Bug fortran/20865] New: error needed jv244 at cam dot ac dot uk
` (4 preceding siblings ...)
2005-04-28 11:56 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-28 11:56 ` cvs-commit at gcc dot gnu dot org
2005-04-28 13:25 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-28 11:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-28 11:56 -------
Subject: Bug 20865
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: fxcoudert@gcc.gnu.org 2005-04-28 11:56:03
Modified files:
gcc/fortran : ChangeLog resolve.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: pr20865.f90
Log message:
PR fortran/20865
* resolve.c (resolve_actual_arglist): Issue an error if a statement
functions is used as actual argument.
* gfortran.dg/pr20865.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.40&r2=1.335.2.41
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.34.2.5&r2=1.34.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.145&r2=1.5084.2.146
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr20865.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-28 11:56 -------
Subject: Bug 20865
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: fxcoudert@gcc.gnu.org 2005-04-28 11:56:08
Modified files:
gcc/fortran : ChangeLog resolve.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: pr20865.f90
Log message:
PR fortran/20865
* resolve.c (resolve_actual_arglist): Issue an error if a statement
functions is used as actual argument.
* gfortran.dg/pr20865.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.407&r2=1.408
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&r1=1.40&r2=1.41
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5409&r2=1.5410
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr20865.f90.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20865
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/20865] statement function shall not be supplied as procedure argument
2005-04-08 15:57 [Bug fortran/20865] New: error needed jv244 at cam dot ac dot uk
` (5 preceding siblings ...)
2005-04-28 11:56 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-28 13:25 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-28 13:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-28 13:24 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20865
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-04-28 13:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-08 15:57 [Bug fortran/20865] New: error needed jv244 at cam dot ac dot uk
2005-04-22 14:44 ` [Bug fortran/20865] statement function shall not be supplied as procedure argument tobi at gcc dot gnu dot org
2005-04-28 7:58 ` fxcoudert at gcc dot gnu dot org
2005-04-28 9:21 ` fxcoudert at gcc dot gnu dot org
2005-04-28 11:35 ` fxcoudert at gcc dot gnu dot org
2005-04-28 11:56 ` cvs-commit at gcc dot gnu dot org
2005-04-28 11:56 ` cvs-commit at gcc dot gnu dot org
2005-04-28 13:25 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).