public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30880] New: incorrect error message for valid code
@ 2007-02-20 7:53 jv244 at cam dot ac dot uk
2007-02-20 14:14 ` [Bug fortran/30880] Derived types with default value -- function with ENTRY: rejected at compile time burnus at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-02-20 7:53 UTC (permalink / raw)
To: gcc-bugs
With recent trunk, gfortran incorrectly generates an error for the following
standard code:
MODULE M1
TYPE T1
INTEGER :: i=7
END TYPE T1
CONTAINS
FUNCTION F1(d1) RESULT(res)
INTEGER :: res
TYPE(T1), INTENT(OUT) :: d1
TYPE(T1), INTENT(INOUT) :: d2
res=d1%i
d1%i=0
RETURN
ENTRY E1(d2) RESULT(res)
res=d2%i
d2%i=0
END FUNCTION F1
END MODULE M1
USE M1
TYPE(T1) :: D1
D1=T1(3)
write(6,*) F1(D1)
D1=T1(3)
write(6,*) E1(D1)
END
--
Summary: incorrect error message for valid code
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30880
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30880] Derived types with default value -- function with ENTRY: rejected at compile time
2007-02-20 7:53 [Bug fortran/30880] New: incorrect error message for valid code jv244 at cam dot ac dot uk
@ 2007-02-20 14:14 ` burnus at gcc dot gnu dot org
2007-03-08 14:23 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-20 14:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2007-02-20 14:14 -------
Error message:
USE M1
1
Error: Dummy 'd1' at (1) cannot have an initializer
Works with g95, nagf95 and ifort. It also works with gfortran if one changes
the ENTRY E1 into a separate function or if one removes the default initializer
for the derived type T1.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2007-02-20 14:14:13
date| |
Summary|incorrect error message for |Derived types with default
|valid code |value -- function with
| |ENTRY: rejected at compile
| |time
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30880
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30880] Derived types with default value -- function with ENTRY: rejected at compile time
2007-02-20 7:53 [Bug fortran/30880] New: incorrect error message for valid code jv244 at cam dot ac dot uk
2007-02-20 14:14 ` [Bug fortran/30880] Derived types with default value -- function with ENTRY: rejected at compile time burnus at gcc dot gnu dot org
@ 2007-03-08 14:23 ` pault at gcc dot gnu dot org
2007-03-08 18:50 ` patchapp at dberlin dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-03-08 14:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2007-03-08 14:23 -------
Created an attachment (id=13171)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13171&action=view)
A fix for the PR
The attached regtests on Cygwin_NT/PIV.
I will submit it to the list tonight.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30880
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30880] Derived types with default value -- function with ENTRY: rejected at compile time
2007-02-20 7:53 [Bug fortran/30880] New: incorrect error message for valid code jv244 at cam dot ac dot uk
2007-02-20 14:14 ` [Bug fortran/30880] Derived types with default value -- function with ENTRY: rejected at compile time burnus at gcc dot gnu dot org
2007-03-08 14:23 ` pault at gcc dot gnu dot org
@ 2007-03-08 18:50 ` patchapp at dberlin dot org
2007-04-07 20:26 ` pault at gcc dot gnu dot org
2007-04-07 20:33 ` pault at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: patchapp at dberlin dot org @ 2007-03-08 18:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from patchapp at dberlin dot org 2007-03-08 18:50 -------
Subject: Bug number PR30880
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/msg00497.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30880
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30880] Derived types with default value -- function with ENTRY: rejected at compile time
2007-02-20 7:53 [Bug fortran/30880] New: incorrect error message for valid code jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2007-03-08 18:50 ` patchapp at dberlin dot org
@ 2007-04-07 20:26 ` pault at gcc dot gnu dot org
2007-04-07 20:33 ` pault at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-04-07 20:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2007-04-07 21:25 -------
Subject: Bug 30880
Author: pault
Date: Sat Apr 7 21:25:43 2007
New Revision: 123645
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123645
Log:
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30880
* resolve.c (resolve_fl_variable): Set flag to 2 for automatic
arrays. Make condition for automatic array error explicit.
If a dummy, no error on an INTENT(OUT) derived type.
2007-04-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30880
* gfortran.dg/used_dummy_types_8.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/used_dummy_types_8.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30880
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30880] Derived types with default value -- function with ENTRY: rejected at compile time
2007-02-20 7:53 [Bug fortran/30880] New: incorrect error message for valid code jv244 at cam dot ac dot uk
` (3 preceding siblings ...)
2007-04-07 20:26 ` pault at gcc dot gnu dot org
@ 2007-04-07 20:33 ` pault at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-04-07 20:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2007-04-07 21:33 -------
Fixed on trumk
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30880
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-04-07 20:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-20 7:53 [Bug fortran/30880] New: incorrect error message for valid code jv244 at cam dot ac dot uk
2007-02-20 14:14 ` [Bug fortran/30880] Derived types with default value -- function with ENTRY: rejected at compile time burnus at gcc dot gnu dot org
2007-03-08 14:23 ` pault at gcc dot gnu dot org
2007-03-08 18:50 ` patchapp at dberlin dot org
2007-04-07 20:26 ` pault at gcc dot gnu dot org
2007-04-07 20:33 ` pault 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).