public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25059] New: better diagnostic needed
@ 2005-11-26 17:49 jv244 at cam dot ac dot uk
2005-11-26 19:29 ` [Bug fortran/25059] ICE after error message fxcoudert at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jv244 at cam dot ac dot uk @ 2005-11-26 17:49 UTC (permalink / raw)
To: gcc-bugs
using GNU Fortran 95 (GCC) 4.1.0 20051126 (prerelease) with '-g -pedantic
-std=f95', I get a bad / no diagnostic for the following invalid code:
MODULE M1
TYPE T1
INTEGER :: I
END TYPE T1
INTERFACE ASSIGNMENT(=)
MODULE PROCEDURE S1
END INTERFACE
CONTAINS
SUBROUTINE S1(I,J)
TYPE(T1), INTENT(OUT):: I
TYPE(T1), INTENT(IN) :: J
I%I=J%I**2
END SUBROUTINE S1
END MODULE M1
USE M1
CONTAINS
PURE SUBROUTINE S2(I,J)
TYPE(T1), INTENT(OUT):: I
TYPE(T1), INTENT(IN) :: J
I=J
END SUBROUTINE S2
END
--
Summary: better diagnostic needed
Product: gcc
Version: 4.1.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=25059
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/25059] ICE after error message
2005-11-26 17:49 [Bug fortran/25059] New: better diagnostic needed jv244 at cam dot ac dot uk
@ 2005-11-26 19:29 ` fxcoudert at gcc dot gnu dot org
2006-02-09 23:23 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-26 19:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2005-11-26 19:29 -------
ICE on that one:
## gfortran ##
In file foo.f90:21
I=J
1
Error: Subroutine 's1' called in lieu of assignment at (1) must be PURE
foo.f90:12: internal compiler error: Segmentation fault
## g95 ##
In file foo.f90:21
I=J
1
Error: Subroutine 's1' called in lieu of assignment at (1) must be PURE
## Intel ##
fortcom: Error: foo.f90, line 21: Any procedure referenced in a PURE procedure,
including one referenced via a defined operation or assignmnent, must be
explicitly declared PURE. [S1]
I=J
-----^
compilation aborted for foo.f90 (code 1)
## Portland ##
PGF90-W-0155-s1 - must also have PURE attribute (foo.f90: 21)
0 inform, 1 warnings, 0 severes, 0 fatal for s2
## Sun ##
I=J
^
"foo.f90", Line = 21, Column = 7: ERROR: Procedure "S1" must be pure or
elemental, because it is referenced in a pure subprogram.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-11-26 19:29:39
date| |
Summary|better diagnostic needed |ICE after error message
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25059
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/25059] ICE after error message
2005-11-26 17:49 [Bug fortran/25059] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-26 19:29 ` [Bug fortran/25059] ICE after error message fxcoudert at gcc dot gnu dot org
@ 2006-02-09 23:23 ` pault at gcc dot gnu dot org
2006-02-13 19:32 ` pault at gcc dot gnu dot org
2006-02-13 19:36 ` pault at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-02-09 23:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2006-02-09 23:23 -------
Subject: Bug 25059
Author: pault
Date: Thu Feb 9 23:23:28 2006
New Revision: 110816
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110816
Log:
2006-02-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26038
* trans-stmt.c (gfc_trans_allocate): Provide assumed character length
scalar with missing backend_decl for the hidden dummy charlen.
PR fortran/25059
* interface.c (gfc_extend_assign): Remove detection of non-PURE
subroutine in assignment interface, with gfc_error, and put it in
* resolve.c (resolve_code).
PR fortran/25070
* interface.c (gfc_procedure_use): Flag rank checking for non-
elemental, contained or interface procedures in call to
(compare_actual_formal), where ranks are checked for assumed
shape arrays..
2006-02-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26038
* gfortran.dg/allocate_char_star_scalar_1.f90: New test.
PR fortran/25059
* gfortran.dg/impure_assignment_1.f90: New test.
PR fortran/25070
* gfortran.dg/assumed_shape_ranks_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/allocate_char_star_scalar_1.f90
trunk/gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f90
trunk/gcc/testsuite/gfortran.dg/impure_assignment_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25059
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/25059] ICE after error message
2005-11-26 17:49 [Bug fortran/25059] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-26 19:29 ` [Bug fortran/25059] ICE after error message fxcoudert at gcc dot gnu dot org
2006-02-09 23:23 ` pault at gcc dot gnu dot org
@ 2006-02-13 19:32 ` pault at gcc dot gnu dot org
2006-02-13 19:36 ` pault at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-02-13 19:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2006-02-13 19:32 -------
Subject: Bug 25059
Author: pault
Date: Mon Feb 13 19:32:02 2006
New Revision: 110921
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110921
Log:
2006-02-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26038
* trans-stmt.c (gfc_trans_allocate): Provide assumed character length
scalar with missing backend_decl for the hidden dummy charlen.
PR fortran/25059
* interface.c (gfc_extend_assign): Remove detection of non-PURE
subroutine in assignment interface, with gfc_error, and put it in
* resolve.c (resolve_code).
PR fortran/25070
* interface.c (gfc_procedure_use): Flag rank checking for non-
elemental, contained or interface procedures in call to
(compare_actual_formal), where ranks are checked for assumed
shape arrays..
2006-02-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26038
* gfortran.dg/allocate_char_star_scalar_1.f90: New test.
PR fortran/25059
* gfortran.dg/impure_assignment_1.f90: New test.
PR fortran/25070
* gfortran.dg/assumed_shape_ranks_1.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/allocate_char_star_scalar_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/impure_assignment_1.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/interface.c
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25059
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/25059] ICE after error message
2005-11-26 17:49 [Bug fortran/25059] New: better diagnostic needed jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2006-02-13 19:32 ` pault at gcc dot gnu dot org
@ 2006-02-13 19:36 ` pault at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-02-13 19:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2006-02-13 19:36 -------
Fixed on trunk and 4.1.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25059
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-02-13 19:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-26 17:49 [Bug fortran/25059] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-26 19:29 ` [Bug fortran/25059] ICE after error message fxcoudert at gcc dot gnu dot org
2006-02-09 23:23 ` pault at gcc dot gnu dot org
2006-02-13 19:32 ` pault at gcc dot gnu dot org
2006-02-13 19:36 ` 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).