public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25071] New: better diagnostic needed
@ 2005-11-26 17:55 jv244 at cam dot ac dot uk
2005-11-26 19:48 ` [Bug fortran/25071] dummy argument larger than actual argument fxcoudert at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: jv244 at cam dot ac dot uk @ 2005-11-26 17:55 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:
INTEGER :: I(2,2)
CALL TST(I)
CONTAINS
SUBROUTINE TST(I)
INTEGER :: I(6)
END SUBROUTINE TST
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=25071
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25071] dummy argument larger than actual argument
2005-11-26 17:55 [Bug fortran/25071] New: better diagnostic needed jv244 at cam dot ac dot uk
@ 2005-11-26 19:48 ` fxcoudert at gcc dot gnu dot org
2007-04-19 15:16 ` burnus at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-26 19:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2005-11-26 19:48 -------
## g95 ##
In file foo.f90:2
CALL TST(I)
1
Error: Array argument at (1) is smaller than the dummy size
## Intel ##
fortcom: Error: foo.f90, line 2: The storage extent of the dummy argument
exceeds that of the actual argument. [I]
CALL TST(I)
---------^
fortcom: Info: foo.f90, line 4: This variable has not been used. [I]
SUBROUTINE TST(I)
----------------^
compilation aborted for foo.f90 (code 1)
## Portland ##
## Sun ##
CALL TST(I)
^
"foo.f90", Line = 2, Column = 10: ERROR: The overall size of the dummy argument
array is greater than the size of this actual argument.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2005-11-26 19:48:38
date| |
Summary|better diagnostic needed |dummy argument larger than
| |actual argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25071
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25071] dummy argument larger than actual argument
2005-11-26 17:55 [Bug fortran/25071] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-26 19:48 ` [Bug fortran/25071] dummy argument larger than actual argument fxcoudert at gcc dot gnu dot org
@ 2007-04-19 15:16 ` burnus at gcc dot gnu dot org
2007-05-03 19:50 ` patchapp at dberlin dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-04-19 15:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2007-04-19 16:16 -------
Analogously for character lengths:
program test
character(len=10) :: x
call foo(x)
write(*,*) 'X=',x
contains
subroutine foo(y)
character(len=20) :: y
y = 'hello world'
end subroutine
end
Taken from: http://ftp.aset.psu.edu/pub/ger/fortran/test/ test17.f90 (slightly
modified).
g95: Actual character argument at (1) is shorter in length than the formal
argument
NAG f95: Character length too short for arg Y (no. 1) of FOO
ifort: Character length argument mismatch. [X]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25071
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25071] dummy argument larger than actual argument
2005-11-26 17:55 [Bug fortran/25071] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-26 19:48 ` [Bug fortran/25071] dummy argument larger than actual argument fxcoudert at gcc dot gnu dot org
2007-04-19 15:16 ` burnus at gcc dot gnu dot org
@ 2007-05-03 19:50 ` patchapp at dberlin dot org
2007-05-04 7:54 ` burnus at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2007-05-03 19:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from patchapp at dberlin dot org 2007-05-03 20:50 -------
Subject: Bug number PR25071
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-05/msg00186.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25071
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25071] dummy argument larger than actual argument
2005-11-26 17:55 [Bug fortran/25071] New: better diagnostic needed jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2007-05-03 19:50 ` patchapp at dberlin dot org
@ 2007-05-04 7:54 ` burnus at gcc dot gnu dot org
2007-05-04 7:55 ` burnus at gcc dot gnu dot org
2007-07-24 9:42 ` burnus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-04 7:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2007-05-04 08:54 -------
Subject: Bug 25071
Author: burnus
Date: Fri May 4 07:54:06 2007
New Revision: 124411
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124411
Log:
2007-05-04 Tobias Burnus <burnus@net-b.de>
PR fortran/25071
* interface.c (compare_actual_formal): Check character length.
2007-05-04 Tobias Burnus <burnus@net-b.de>
PR fortran/25071
* gfortran.dg/char_length_3.f90: New test.
* gfortran.dg/char_result_2.f90: Fix test.
Added:
trunk/gcc/testsuite/gfortran.dg/char_length_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/char_result_2.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25071
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25071] dummy argument larger than actual argument
2005-11-26 17:55 [Bug fortran/25071] New: better diagnostic needed jv244 at cam dot ac dot uk
` (3 preceding siblings ...)
2007-05-04 7:54 ` burnus at gcc dot gnu dot org
@ 2007-05-04 7:55 ` burnus at gcc dot gnu dot org
2007-07-24 9:42 ` burnus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-04 7:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2007-05-04 08:55 -------
Note: Only the string length problem is fixed; the array storage extend still
needs to be fixed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25071
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25071] dummy argument larger than actual argument
2005-11-26 17:55 [Bug fortran/25071] New: better diagnostic needed jv244 at cam dot ac dot uk
` (4 preceding siblings ...)
2007-05-04 7:55 ` burnus at gcc dot gnu dot org
@ 2007-07-24 9:42 ` burnus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-07-24 9:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from burnus at gcc dot gnu dot org 2007-07-24 09:42 -------
I believe this is fixed by PR30940.
The first example gives:
Warnung: Actual argument contains too few elements for dummy argument 'i' (4/6)
at (1)
The second example:
Warnung: Character length of actual argument shorter than of dummy argument 'y'
(10/20) at (1)
It currently gives only warnings since I failed to get any comments when an
error and when only a warning should be given.
Missing is the check for array element designators: PR32616.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25071
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-07-24 9:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-26 17:55 [Bug fortran/25071] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-26 19:48 ` [Bug fortran/25071] dummy argument larger than actual argument fxcoudert at gcc dot gnu dot org
2007-04-19 15:16 ` burnus at gcc dot gnu dot org
2007-05-03 19:50 ` patchapp at dberlin dot org
2007-05-04 7:54 ` burnus at gcc dot gnu dot org
2007-05-04 7:55 ` burnus at gcc dot gnu dot org
2007-07-24 9:42 ` burnus 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).